Class UnitsImpl

  • All Implemented Interfaces:
    Units

    public class UnitsImpl
    extends java.lang.Object
    implements Units
    • Method Detail

      • availableUnits

        public java.util.List<UnitType> availableUnits()
        Description copied from interface: Units
        Returns an array of available units.
        Specified by:
        availableUnits in interface Units
      • getUnitDisplayName

        public java.lang.String getUnitDisplayName​(UnitType unit,
                                                   UnitLength length)
        Description copied from interface: Units
        Returns the display name for the given unit.
        Specified by:
        getUnitDisplayName in interface Units
      • formatQuantity

        public java.lang.String formatQuantity​(Quantity qty)
        Description copied from interface: Units
        Formats the given unit quantity to string.
        Specified by:
        formatQuantity in interface Units
      • formatQuantityToParts

        public java.util.List<Part> formatQuantityToParts​(Quantity qty)
        Description copied from interface: Units
        Formats the given unit quantity to an array of parts.
        Specified by:
        formatQuantityToParts in interface Units
      • formatQuantitySequence

        public java.lang.String formatQuantitySequence​(java.util.List<Quantity> qty)
        Description copied from interface: Units
        Formats the given unit quantity sequence to string.
        Specified by:
        formatQuantitySequence in interface Units
      • formatQuantitySequence

        public java.lang.String formatQuantitySequence​(java.util.List<Quantity> qty,
                                                       UnitFormatOptions options)
        Description copied from interface: Units
        Formats the given unit quantity sequence to string.
        Specified by:
        formatQuantitySequence in interface Units
      • formatQuantitySequenceToParts

        public java.util.List<Part> formatQuantitySequenceToParts​(java.util.List<Quantity> qty)
        Description copied from interface: Units
        Formats the given unit quantity sequence to an array of parts.
        Specified by:
        formatQuantitySequenceToParts in interface Units