Package com.singularsys.extensions.xjep
Class FieldTreeUtils
- java.lang.Object
-
- com.singularsys.extensions.xjep.TreeUtils
-
- com.singularsys.extensions.xjep.FieldTreeUtils
-
- All Implemented Interfaces:
JepComponent,java.io.Serializable
public class FieldTreeUtils extends TreeUtils
The TreeUtility functions adapted to work with a Field.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FieldTreeUtils(FieldI field)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIntValue(java.lang.Object val)Convert value to integer.booleanisInfinityVal(java.lang.Object val)Uses a field to test for a value equals +/- infinity Some fields may not have infinite valuesbooleanisIntegerVal(java.lang.Object val)Uses theIntegerConvertorinterface of a field to test for integer values.booleanisMinusOneVal(java.lang.Object value)Uses a field to test for -1booleanisNaNVal(java.lang.Object val)Uses a field to test for a NaN value Some fields may not have NaN valuesbooleanisNegativeVal(java.lang.Object value)Uses a field to test for negative valuesbooleanisOneVal(java.lang.Object value)Uses a field to test for a value equals onebooleanisPositiveVal(java.lang.Object value)Uses a field to test for a positive valuebooleanisZeroVal(java.lang.Object value)Uses a field to test for a value equals zero-
Methods 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 Detail
-
FieldTreeUtils
public FieldTreeUtils(FieldI field)
Constructor- Parameters:
field- the field to use
-
-
Method Detail
-
isMinusOneVal
public boolean isMinusOneVal(java.lang.Object value)
Uses a field to test for -1- Overrides:
isMinusOneValin classTreeUtils- Parameters:
value- value to test- Returns:
- true in value is -1 false otherwise
-
isNegativeVal
public boolean isNegativeVal(java.lang.Object value)
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
public boolean isOneVal(java.lang.Object value)
Uses a field to test for a value equals one
-
isPositiveVal
public boolean isPositiveVal(java.lang.Object value)
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
public boolean isZeroVal(java.lang.Object value)
Uses a field to test for a value equals zero
-
isInfinityVal
public boolean isInfinityVal(java.lang.Object val)
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
public boolean isNaNVal(java.lang.Object val)
Uses a field to test for a NaN value Some fields may not have NaN values
-
isIntegerVal
public boolean isIntegerVal(java.lang.Object val)
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
public int getIntValue(java.lang.Object val) throws EvaluationExceptionConvert 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.
-
-