Style Intelligence v12.0

inetsoft.report.filter
Interface Formula

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
Formula2, PercentageFormula
All Known Implementing Classes:
AverageFormula, CalcFieldFormula, ConcatFormula, CorrelationFormula, CountFormula, CovarianceFormula, CubeMeasureFormula, DefaultFormula, DistinctCountFormula, FirstFormula, LastFormula, MaxFormula, MedianFormula, MinFormula, ModeFormula, NoneFormula, NthLargestFormula, NthMostFrequentFormula, NthSmallestFormula, PopulationStandardDeviationFormula, PopulationVarianceFormula, ProductFormula, PthPercentileFormula, StandardDeviationFormula, SumFormula, VarianceFormula, WeightedAverageFormula

public interface Formula
extends Cloneable, Serializable

This interface is implemented by all Formula objects. A formula is used by table filters to calculate data. At beginning of the filtering process, reset() is called on every formula object associated with the filter, then addValue() is called zero or more times to add the data items. At the end, getResult() is called to retrieve the calculated value.


Field Summary
static String __NULL__
          Set the null as a special string.
 
Method Summary
 void addValue(double v)
          Add a double value to the formula.
 void addValue(double[] vs)
          Add double values to the formula.
 void addValue(float v)
          Add a float value to the formula.
 void addValue(int v)
          Add an int value to the formula.
 void addValue(long v)
          Add a long value to the formula.
 void addValue(Object v)
          Add a value to the formula.
 void addValue(short v)
          Add a short value to the formula.
 Object clone()
          Clone this formula.
 String getDisplayName()
          Get formula display name.
 double getDoubleResult()
          Get the formula result.
 String getName()
          Get formula name.
 Object getResult()
          Get the formula result.
 boolean isDefaultResult()
          Get the default result option of this formula.
 void reset()
          Reset the formula to start over.
 void setDefaultResult(boolean def)
          Set the default result option of this formula.
 

Field Detail

__NULL__

static final String __NULL__
Set the null as a special string.

See Also:
Constant Field Values
Method Detail

reset

void reset()
Reset the formula to start over.


addValue

void addValue(Object v)
Add a value to the formula.


addValue

void addValue(double v)
Add a double value to the formula.


addValue

void addValue(double[] vs)
Add double values to the formula.


addValue

void addValue(float v)
Add a float value to the formula.


addValue

void addValue(long v)
Add a long value to the formula.


addValue

void addValue(int v)
Add an int value to the formula.


addValue

void addValue(short v)
Add a short value to the formula.


getResult

Object getResult()
Get the formula result.


getDoubleResult

double getDoubleResult()
Get the formula result.


clone

Object clone()
Clone this formula. This may or may not copy the values from this formula.


getDisplayName

String getDisplayName()
Get formula display name.


getName

String getName()
Get formula name.


isDefaultResult

boolean isDefaultResult()
Get the default result option of this formula.

Returns:
true to use the default value of a formula if no result, false to just return null.

setDefaultResult

void setDefaultResult(boolean def)
Set the default result option of this formula.

Parameters:
def - true to use the default value of a formula if no result, false to just return null.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.