Class AnyNumberSequence
- java.lang.Object
-
- org.pentaho.reporting.libraries.formula.typing.sequence.AnySequence
-
- org.pentaho.reporting.libraries.formula.typing.sequence.AnyNumberSequence
-
- All Implemented Interfaces:
NumberSequence,Sequence
public class AnyNumberSequence extends AnySequence implements NumberSequence
A sequence that treats text-values as valid numbers that always evaluate to zero. Logical values are treated as numbers as well and always evaluate to 0 for false and 1 for true.- Author:
- Cedric Pronzato
-
-
Constructor Summary
Constructors Constructor Description AnyNumberSequence(FormulaContext context)Empty number sequence.AnyNumberSequence(LValue n, FormulaContext context)Number sequence bounded to only one number item.AnyNumberSequence(ArrayCallback array, FormulaContext context)Number sequence bounded to an array.AnyNumberSequence(AnySequence anySequence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisValidNext(LValue o)NumbernextNumber()-
Methods inherited from class org.pentaho.reporting.libraries.formula.typing.sequence.AnySequence
getArray, getColumnCursor, getContext, getRowCursor, getSingle, hasNext, next, nextRawValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.libraries.formula.typing.Sequence
hasNext, next, nextRawValue
-
-
-
-
Constructor Detail
-
AnyNumberSequence
public AnyNumberSequence(FormulaContext context)
Empty number sequence.
-
AnyNumberSequence
public AnyNumberSequence(LValue n, FormulaContext context)
Number sequence bounded to only one number item.- Parameters:
n- A number
-
AnyNumberSequence
public AnyNumberSequence(ArrayCallback array, FormulaContext context)
Number sequence bounded to an array.- Parameters:
array-
-
AnyNumberSequence
public AnyNumberSequence(AnySequence anySequence)
-
-
Method Detail
-
isValidNext
protected boolean isValidNext(LValue o) throws EvaluationException
- Overrides:
isValidNextin classAnySequence- Throws:
EvaluationException
-
nextNumber
public Number nextNumber() throws EvaluationException
- Specified by:
nextNumberin interfaceNumberSequence- Throws:
EvaluationException
-
-