Package com.singularsys.extensions.xjep
Class FieldTreeUtils
java.lang.Object
com.singularsys.extensions.xjep.TreeUtils
com.singularsys.extensions.xjep.FieldTreeUtils
- All Implemented Interfaces:
JepComponent,Serializable
The TreeUtility functions adapted to work with a Field.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetIntValue(Object val) Convert value to integer.booleanisInfinityVal(Object val) Uses a field to test for a value equals +/- infinity Some fields may not have infinite valuesbooleanisIntegerVal(Object val) Uses theIntegerConvertorinterface of a field to test for integer values.booleanisMinusOneVal(Object value) Uses a field to test for -1booleanUses a field to test for a NaN value Some fields may not have NaN valuesbooleanisNegativeVal(Object value) Uses a field to test for negative valuesbooleanUses a field to test for a value equals onebooleanisPositiveVal(Object value) Uses a field to test for a positive valuebooleanUses a field to test for a value equals zeroMethods inherited from class com.singularsys.extensions.xjep.TreeUtils
complexValue, getChildrenAsArray, getCI, getCMinusI, getCMinusOne, getCOne, getCZero, getFalse, getLightWeightInstance, getMinusOne, getNAN, getNegativeInfinity, getOne, getPositiveInfinity, getTrue, getTwo, getZero, hasInfinity, hasNaN, init, intValue, isBinaryOperator, isComplex, isComplexVal, isConstant, isConstantVariable, isFunction, isInfinity, isInteger, isMinusOne, isNaN, isNegative, isOne, isOperator, isPositive, isReal, isRealVal, isUnaryOperator, isVariable, isZero, setChildrenIfNeeded
-
Constructor Details
-
FieldTreeUtils
Constructor- Parameters:
field- the field to use
-
-
Method Details
-
isMinusOneVal
Uses a field to test for -1- Overrides:
isMinusOneValin classTreeUtils- Parameters:
value- value to test- Returns:
- true in value is -1 false otherwise
-
isNegativeVal
Uses a field to test for negative values- Overrides:
isNegativeValin classTreeUtils- Parameters:
value- value to test- Returns:
- true in value is negative false otherwise
-
isOneVal
Uses a field to test for a value equals one -
isPositiveVal
Uses a field to test for a positive value- Overrides:
isPositiveValin classTreeUtils- Parameters:
value- value to test- Returns:
- true in value is positive false otherwise
-
isZeroVal
Uses a field to test for a value equals zero -
isInfinityVal
Uses a field to test for a value equals +/- infinity Some fields may not have infinite values- Overrides:
isInfinityValin classTreeUtils- Parameters:
val- value to test- Returns:
- true in value is infinite false otherwise
-
isNaNVal
Uses a field to test for a NaN value Some fields may not have NaN values -
isIntegerVal
Uses theIntegerConvertorinterface of a field to test for integer values.- Overrides:
isIntegerValin classTreeUtils- Parameters:
val- value to test- Returns:
- true in value is positive false otherwise
-
getIntValue
Convert value to integer. AssumesisIntegerVal(Object)return true- Overrides:
getIntValuein classTreeUtils- Parameters:
val- value to convert- Returns:
- val converted to an integer
- Throws:
EvaluationException- if the field does not implementIntegerConvertoror the conversion failed.
-