Style Intelligence v12.0

inetsoft.report.filter
Class CountFormula

java.lang.Object
  extended by inetsoft.report.filter.CountFormula
All Implemented Interfaces:
Formula, PercentageFormula, Serializable, Cloneable

public class CountFormula
extends Object
implements PercentageFormula

Count the number of items. The value of the item is not significant.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface inetsoft.report.filter.Formula
__NULL__
 
Constructor Summary
CountFormula()
           
 
Method Summary
 void addValue(double v)
          Add a double value to the formula.
 void addValue(double[] v)
          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 getOriginalResult()
          Get the original formula result without percentage.
 int getPercentageType()
          Get percentage type.
 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.
 void setPercentageType(int percentageType)
          Set percentage type.
 void setTotal(Object total)
          Set the total used to calculate percentage.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountFormula

public CountFormula()
Method Detail

reset

public void reset()
Reset the formula to start over.

Specified by:
reset in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

addValue

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

Specified by:
addValue in interface Formula

setDefaultResult

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

Specified by:
setDefaultResult in interface Formula
Parameters:
def - true to use the default value of a formula if no result, false to just return null.

isDefaultResult

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

Specified by:
isDefaultResult in interface Formula
Returns:
true to use the default value of a formula if no result, false to just return null.

getResult

public Object getResult()
Get the formula result.

Specified by:
getResult in interface Formula

getDoubleResult

public double getDoubleResult()
Get the formula result.

Specified by:
getDoubleResult in interface Formula

clone

public Object clone()
Description copied from interface: Formula
Clone this formula. This may or may not copy the values from this formula.

Specified by:
clone in interface Formula
Overrides:
clone in class Object

getPercentageType

public int getPercentageType()
Get percentage type.

Specified by:
getPercentageType in interface PercentageFormula

setPercentageType

public void setPercentageType(int percentageType)
Set percentage type. three types: StyleConstants.PERCENTAGE_NONE, StyleConstants.PERCENTAGE_OF_GROUP, StyleConstants.PERCENTAGE_OF_GRANDTOTAL.

Specified by:
setPercentageType in interface PercentageFormula

setTotal

public void setTotal(Object total)
Set the total used to calculate percentage. if percentage type is PERCENTAGE_NONE, it is ineffective to invoke the method.

Specified by:
setTotal in interface PercentageFormula

getOriginalResult

public Object getOriginalResult()
Get the original formula result without percentage.

Specified by:
getOriginalResult in interface PercentageFormula

getDisplayName

public String getDisplayName()
Get formula display name.

Specified by:
getDisplayName in interface Formula

getName

public String getName()
Get formula name.

Specified by:
getName in interface Formula

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