com.businessobjects.rebean.wi
Interface BlockBreak


public interface BlockBreak

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

The BlockBreak interface is a collection of all breaks in an axis.


Method Summary
 BreakElement createBreakElement(ReportExpression expr)
           Creates a break on a report expression.
 boolean equals(java.lang.Object o)
          Compares the specified Object o with this BlockBreak for equality.
 BreakElement findBreak(ReportExpression expr)
          Search for the break element matching a given expression.
 BreakElement getBreakElement(int index)
          Returns the break element at the specified position.
 int getCount()
          Returns the number of breaks in this axis.
 void move(int fromIndex, int toIndex)
          Moves a break from one place to another in the hierarchy.
 void removeAll()
          Removes all breaks in this axis.
 void removeBreak(int index)
          Remove a break element at a given index.
 void removeBreak(ReportExpression expr)
          Remove any break element for an expression.
 

Method Detail

createBreakElement

BreakElement createBreakElement(ReportExpression expr)
                                throws REException

Creates a break on a report expression. If there is already a break on that expression, the old break element is replaced by the new one.

The break value in the footer is always placed relative to the first occurrence of expr in this BlockAxis.

Parameters:
expr - the expression to create a break on
Returns:
the break element describing the new break
Throws:
ReportException - when expr is not in the axis
java.lang.NullPointerException - when expr is null
REException

removeBreak

void removeBreak(ReportExpression expr)
Remove any break element for an expression. If there is not a break on expr (in this BlockBreak, or when expr == null, nothing happens.

Parameters:
expr - the break expression to be removed.

removeBreak

void removeBreak(int index)
Remove a break element at a given index.

Parameters:
index - the index of the break to be removed.
Throws:
ArrayIndexOutOfBoundException - when index is out of range (index < 0 || index >= getCount())

removeAll

void removeAll()
Removes all breaks in this axis.


getCount

int getCount()
Returns the number of breaks in this axis.

Returns:
the number of breaks

getBreakElement

BreakElement getBreakElement(int index)
Returns the break element at the specified position.

Parameters:
index - the index of the break element to return (0 based)
Returns:
the break element at the specified index
Throws:
java.lang.ArrayIndexOutOfBoundsException - if index is out of range (index < 0 || index >= getCount())

findBreak

BreakElement findBreak(ReportExpression expr)
Search for the break element matching a given expression.

Parameters:
expr - the expression to be searched for.
Returns:
the break element where BreakElement.getExpression().equals(expr), or null when expr could not be found

move

void move(int fromIndex,
          int toIndex)
Moves a break from one place to another in the hierarchy. This method is used change the priority of a particular break.

Parameters:
fromIndex - the index of the break to move.
toIndex - the index to which break will be moved.
Throws:
java.lang.IndexOutOfBoundsException - when fromIndex or toIndex are invalid
Since:
6.5.0

equals

boolean equals(java.lang.Object o)
Compares the specified Object o with this BlockBreak for equality. Returns true if and only if the specified Object is also a BlockBreak and has the same BreakElements, in the same order.

Overrides:
equals in class java.lang.Object
Parameters:
o - the Object to be compared for equality with this BlockBreak
Returns:
true if the specified Object is equal to this BlockBreak