Class Num

java.lang.Object
ise.antelope.tasks.Num

public class Num extends Object
Represents a number.

Copyright 2003, Dale Anson, all rights reserved

  • Constructor Details

    • Num

      public Num()
    • Num

      public Num(String value)
  • Method Details

    • setValue

      public void setValue(String value)
      Set the value for this number. This string must parse to the set datatype, for example, setting value to "7.992" and datatype to INT will cause a number format exception to be thrown. Supports two special numbers, "E" and "PI".
      Parameters:
      value - the value for this number
    • getValue

      public Number getValue()
      Returns:
      the value for this number as a Number. Cast as appropriate to Integer, Long, Float, or Double.
    • setDatatype

      public void setDatatype(String p)
      Sets the datatype of this number. Allowed values are "int", "long", "float", or "double".
    • getDatatype

      public String getDatatype()
      Returns:
      the datatype as one of the defined types.
    • toString

      public String toString()
      Overrides:
      toString in class Object