Class FloatUnit

  • All Implemented Interfaces:
    CloneableType, Cloneable

    public class FloatUnit
    extends Object
    implements CloneableType
    This class represents a quantity consisting of a float value and an optional units specification.
    • Constructor Detail

      • FloatUnit

        public FloatUnit​(String source)
        Creates a new float unit by parsing a String value
        Parameters:
        source - String value to parse
      • FloatUnit

        public FloatUnit​(float value,
                         String units)
        Parameters:
        value - float value
        units - Units represented, or null.
    • Method Detail

      • getUnits

        public String getUnits()
        Returns the units.
        Returns:
        Returns the units.
      • getValue

        public float getValue()
        Returns the float value.
        Returns:
        Returns the float value.
      • toString

        public String toString()
        Returns a String representation of the object.
        Overrides:
        toString in class Object
        Returns:
        Returns a String representation of the object.