Package net.sf.jasperreports.engine.fill
Interface JRCalculable
- All Known Implementing Classes:
JRFillVariable,MeasureDefinition.MeasureValue
public interface JRCalculable
Interface for objects that can be used by extended incrementers for calculations.
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteConstant for the count helper variable.static final intThe number of defined helper variables.static final byteConstant for the sum helper variable.static final byteConstant for the variance helper variable. -
Method Summary
Modifier and TypeMethodDescriptiongetHelperVariable(byte helperType) Returns a helper variable.Returns the incremented value of the calculable object.getValue()Returns the value of the calculable object.booleanReturnstrueif and only if the calculable object was only initialized and not incremented.voidsetInitialized(boolean isInitialized) Sets the initialized flag for this calculable object.
-
Field Details
-
HELPER_COUNT
static final byte HELPER_COUNTConstant for the count helper variable.- See Also:
-
HELPER_SUM
static final byte HELPER_SUMConstant for the sum helper variable.- See Also:
-
HELPER_VARIANCE
static final byte HELPER_VARIANCEConstant for the variance helper variable.- See Also:
-
HELPER_SIZE
static final int HELPER_SIZEThe number of defined helper variables.- See Also:
-
-
Method Details
-
isInitialized
boolean isInitialized()Returnstrueif and only if the calculable object was only initialized and not incremented.- Returns:
trueif and only if the calculable object was only initialized and not incremented
-
setInitialized
void setInitialized(boolean isInitialized) Sets the initialized flag for this calculable object.- Parameters:
isInitialized- the initialized flag- See Also:
-
getIncrementedValue
Object getIncrementedValue()Returns the incremented value of the calculable object.- Returns:
- the incremented value
-
getValue
Object getValue()Returns the value of the calculable object.- Returns:
- the value
-
getHelperVariable
Returns a helper variable.- Parameters:
helperType- the desired helper variable type- Returns:
- the helper variable
-