Package ucar.units

Class UnitID

    • Constructor Detail

      • UnitID

        public UnitID()
    • Method Detail

      • newUnitID

        public static UnitID newUnitID​(String name,
                                       String plural,
                                       String symbol)
        Factory method for constructing an identifier from a name, plural, and symbol.
        Parameters:
        name - The name for the unit. May be null .
        plural - The plural form of the name. If null and name is non- null, then regular plural-forming rules are used on the name.
        symbol - The symbol for the unit. May be null .
      • getName

        public abstract String getName()
        Returns the name of the unit.
        Returns:
        The name of the unit. May be null.
      • getPlural

        public abstract String getPlural()
        Returns the plural form of the name of the unit.
        Returns:
        The plural form of the name of the unit. May be null .
      • getSymbol

        public abstract String getSymbol()
        Returns the symbol for the unit.
        Returns:
        The symbol for the unit. May be null.
      • toString

        public abstract String toString()
        Returns the string representation of this identifier.
        Overrides:
        toString in class Object
        Returns:
        The string representation of this identifier.