public class FieldTreeUtils extends TreeUtils
Constructor and Description |
---|
FieldTreeUtils(FieldI field)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getIntValue(java.lang.Object val)
Convert value to integer.
|
boolean |
isInfinityVal(java.lang.Object val)
Uses a field to test for a value equals +/- infinity
Some fields may not have infinite values
|
boolean |
isIntegerVal(java.lang.Object val)
Uses the
IntegerConvertor interface of a field to test for integer values. |
boolean |
isMinusOneVal(java.lang.Object value)
Uses a field to test for -1
|
boolean |
isNaNVal(java.lang.Object val)
Uses a field to test for a NaN value
Some fields may not have NaN values
|
boolean |
isNegativeVal(java.lang.Object value)
Uses a field to test for negative values
|
boolean |
isOneVal(java.lang.Object value)
Uses a field to test for a value equals one
|
boolean |
isPositiveVal(java.lang.Object value)
Uses a field to test for a positive value
|
boolean |
isZeroVal(java.lang.Object value)
Uses a field to test for a value equals zero
|
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
public FieldTreeUtils(FieldI field)
field
- the field to usepublic boolean isMinusOneVal(java.lang.Object value)
isMinusOneVal
in class TreeUtils
value
- value to testpublic boolean isNegativeVal(java.lang.Object value)
isNegativeVal
in class TreeUtils
value
- value to testpublic boolean isOneVal(java.lang.Object value)
public boolean isPositiveVal(java.lang.Object value)
isPositiveVal
in class TreeUtils
value
- value to testpublic boolean isZeroVal(java.lang.Object value)
public boolean isInfinityVal(java.lang.Object val)
isInfinityVal
in class TreeUtils
val
- value to testpublic boolean isNaNVal(java.lang.Object val)
public boolean isIntegerVal(java.lang.Object val)
IntegerConvertor
interface of a field to test for integer values.isIntegerVal
in class TreeUtils
val
- value to testpublic int getIntValue(java.lang.Object val) throws EvaluationException
isIntegerVal(Object)
return truegetIntValue
in class TreeUtils
val
- value to convertEvaluationException
- if the field does not implement IntegerConvertor
or the conversion failed.Copyright © 2018 Singular Systems http://www.singularsys.com/jep