Class Numeric

  • All Implemented Interfaces:
    Value

    public class Numeric
    extends Scalar
    This class represents a numeric scalar. It is not type specific so everything is represented as a String.
    Version:
    $Revision$
    Author:
    pramirez, jagander
    • Constructor Detail

      • Numeric

        public Numeric​(String value)
        Constructs a Numeric with the given value
        Parameters:
        value - of numeric
      • Numeric

        public Numeric​(String value,
                       String units)
        Constructs a Numeric with the given value and units
        Parameters:
        value - of numeric
        units - of numeric
      • Numeric

        public Numeric​(String value,
                       int radix)
        Constructs a Numeric with the given value and radix
        Parameters:
        value - of numeric
        radix - of numeric
      • Numeric

        public Numeric​(String value,
                       String units,
                       int radix)
        Constructs a Numeric with the given value, units and radix
        Parameters:
        value - of numeric
        units - of numeric
        radix - of numeric
    • Method Detail

      • setUnits

        public void setUnits​(String units)
        Sets the units
        Parameters:
        units - of the numeric
      • getUnits

        public String getUnits()
        Retrieves the units
        Returns:
        units
      • setRadix

        public void setRadix​(int radix)
        Sets the radix
        Parameters:
        radix - of the numeric
      • getRadix

        public int getRadix()
        Retrieves the base
        Returns:
        base
      • normalize

        public String normalize()