Class FieldTreeUtils

java.lang.Object
com.singularsys.extensions.xjep.TreeUtils
com.singularsys.extensions.xjep.FieldTreeUtils
All Implemented Interfaces:
JepComponent, Serializable

public class FieldTreeUtils extends TreeUtils
The TreeUtility functions adapted to work with a Field.
See Also:
  • Constructor Details

    • FieldTreeUtils

      public FieldTreeUtils(FieldI field)
      Constructor
      Parameters:
      field - the field to use
  • Method Details

    • isMinusOneVal

      public boolean isMinusOneVal(Object value)
      Uses a field to test for -1
      Overrides:
      isMinusOneVal in class TreeUtils
      Parameters:
      value - value to test
      Returns:
      true in value is -1 false otherwise
    • isNegativeVal

      public boolean isNegativeVal(Object value)
      Uses a field to test for negative values
      Overrides:
      isNegativeVal in class TreeUtils
      Parameters:
      value - value to test
      Returns:
      true in value is negative false otherwise
    • isOneVal

      public boolean isOneVal(Object value)
      Uses a field to test for a value equals one
      Overrides:
      isOneVal in class TreeUtils
      Parameters:
      value - value to test
      Returns:
      true in value is one false otherwise
    • isPositiveVal

      public boolean isPositiveVal(Object value)
      Uses a field to test for a positive value
      Overrides:
      isPositiveVal in class TreeUtils
      Parameters:
      value - value to test
      Returns:
      true in value is positive false otherwise
    • isZeroVal

      public boolean isZeroVal(Object value)
      Uses a field to test for a value equals zero
      Overrides:
      isZeroVal in class TreeUtils
      Parameters:
      value - value to test
      Returns:
      true in value is zero false otherwise
    • isInfinityVal

      public boolean isInfinityVal(Object val)
      Uses a field to test for a value equals +/- infinity Some fields may not have infinite values
      Overrides:
      isInfinityVal in class TreeUtils
      Parameters:
      val - value to test
      Returns:
      true in value is infinite false otherwise
    • isNaNVal

      public boolean isNaNVal(Object val)
      Uses a field to test for a NaN value Some fields may not have NaN values
      Overrides:
      isNaNVal in class TreeUtils
      Parameters:
      val - value to test
      Returns:
      true in value is zero false otherwise
    • isIntegerVal

      public boolean isIntegerVal(Object val)
      Uses the IntegerConvertor interface of a field to test for integer values.
      Overrides:
      isIntegerVal in class TreeUtils
      Parameters:
      val - value to test
      Returns:
      true in value is positive false otherwise
    • getIntValue

      public int getIntValue(Object val) throws EvaluationException
      Convert value to integer. Assumes isIntegerVal(Object) return true
      Overrides:
      getIntValue in class TreeUtils
      Parameters:
      val - value to convert
      Returns:
      val converted to an integer
      Throws:
      EvaluationException - if the field does not implement IntegerConvertor or the conversion failed.