|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlockCalculation
Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.
TheBlockCalculation
is a collection of horizontal or vertical
calculations.
Method Summary | |
---|---|
CalculationElement |
createCalculationElement(ReportExpression expr,
Calculation calculation)
Creates a calculation on a report expression. |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this BlockCalculation for equality. |
CalculationElement[] |
findCalculations(ReportExpression expr)
Looks for any calculation elements for a given expression. |
CalculationElement |
getCalculationElement(int index)
Returns the calculation element at the specified position. |
int |
getCount()
Gets the number of calculations in this axis. |
void |
removeAll()
Removes any calculations in this axis. |
void |
removeCalculation(CalculationElement calc)
Removes a given calculation element. |
void |
removeCalculation(int index)
Remove a calculation element at a given index. |
Method Detail |
---|
CalculationElement createCalculationElement(ReportExpression expr, Calculation calculation) throws REException
Creates a calculation on a report expression. When there already is a calculation of the specified type on that expression, the old calculation element is replaced by the new one.
When calling this method on a BlockCalculation
obtained
from either BlockAxis.getHBlockCalculation()
or
BlockAxis.getVBlockCalculation()
, expr
has to be
on the axis, otherwise a ReportException
is thrown.
Passing a null
value for expr
in this case
will result in a NullPointerException
. When
expr
exists several times on the BlockAxis
,
the first occurrence is used as the base position for the calculation.
When calling this method on a BlockCalculation
obtained
from either Table.getHBlockCalculation(TableCell)
or
Table.getVBlockCalculation(TableCell)
, expr
should be null
.
expr
- the expression to create a calculation on, or
null
when creating a calculation for a specific
cellcalculation
- the calculation to create
ReportException
- when expr
is not in the axis or in the table
cell
java.lang.NullPointerException
- when expr
is null
and this
BlockCalculation
has been obtained from a
BlockAxis
REException
void removeCalculation(CalculationElement calc)
Removes a given calculation element.
When this BlockCalculation
has been obtained from a
BlockAxis
, all calculations of type
calc.getType()
will be removed, for all occurrences of
calc.getExpression()
on the block axis.
When this BlockCalculation
has been obtained from a
TableCell
, only the calculations of type
calc.getType()
will be removed for the cell specified in
the call to Table.getHBlockCalculation(TableCell)
or
Table.getVBlockCalculation(TableCell)
.
calc
- the calculation element to removevoid removeCalculation(int index)
index
- the index at which to remove the calculation
java.lang.ArrayIndexOutOfBoundsException
- when index
is out of range (index < 0 || index >= getCount()
)void removeAll()
int getCount()
CalculationElement getCalculationElement(int index)
index
- the index of the calculation element to return (0 based)
java.lang.ArrayIndexOutOfBoundsException
- if index
is out of range (index < 0 || index >= getCount()
)CalculationElement[] findCalculations(ReportExpression expr)
expr
- The expression to look for. When this block calculation has
been obtained from either
Table.getHBlockCalculation(TableCell)
or
Table.getVBlockCalculation(TableCell)
, it is safe to
pass null
.
CalculationElement.getExpression()
.equals(expr)
boolean equals(java.lang.Object o)
true
if and only if the specified Object is also a
BlockCalculation and has the same CalculationElement
s, in
the same order.
equals
in class java.lang.Object
o
- the Object to be compared for equality with this
BlockCalculation
true
if the specified Object is equal to this
BlockCalculation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |