Package com.squarespace.cldrengine.api
Interface Units
-
- All Known Implementing Classes:
UnitsImpl
public interface Units
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<UnitType>
availableUnits()
Returns an array of available units.java.lang.String
formatQuantity(Quantity qty)
Formats the given unit quantity to string.java.lang.String
formatQuantity(Quantity qty, UnitFormatOptions options)
Formats the given unit quantity to string.java.lang.String
formatQuantitySequence(java.util.List<Quantity> qty)
Formats the given unit quantity sequence to string.java.lang.String
formatQuantitySequence(java.util.List<Quantity> qty, UnitFormatOptions options)
Formats the given unit quantity sequence to string.java.util.List<Part>
formatQuantitySequenceToParts(java.util.List<Quantity> qty)
Formats the given unit quantity sequence to an array of parts.java.util.List<Part>
formatQuantitySequenceToParts(java.util.List<Quantity> qty, UnitFormatOptions options)
Formats the given unit quantity sequence to an array of parts.java.util.List<Part>
formatQuantityToParts(Quantity qty)
Formats the given unit quantity to an array of parts.java.util.List<Part>
formatQuantityToParts(Quantity qty, UnitFormatOptions options)
Formats the given unit quantity to an array of parts.java.lang.String
getUnitDisplayName(UnitType unit, UnitLength length)
Returns the display name for the given unit.
-
-
-
Method Detail
-
availableUnits
java.util.List<UnitType> availableUnits()
Returns an array of available units.
-
formatQuantity
java.lang.String formatQuantity(Quantity qty)
Formats the given unit quantity to string.
-
formatQuantity
java.lang.String formatQuantity(Quantity qty, UnitFormatOptions options)
Formats the given unit quantity to string.
-
formatQuantityToParts
java.util.List<Part> formatQuantityToParts(Quantity qty)
Formats the given unit quantity to an array of parts.
-
formatQuantityToParts
java.util.List<Part> formatQuantityToParts(Quantity qty, UnitFormatOptions options)
Formats the given unit quantity to an array of parts.
-
formatQuantitySequence
java.lang.String formatQuantitySequence(java.util.List<Quantity> qty)
Formats the given unit quantity sequence to string.
-
formatQuantitySequence
java.lang.String formatQuantitySequence(java.util.List<Quantity> qty, UnitFormatOptions options)
Formats the given unit quantity sequence to string.
-
formatQuantitySequenceToParts
java.util.List<Part> formatQuantitySequenceToParts(java.util.List<Quantity> qty)
Formats the given unit quantity sequence to an array of parts.
-
formatQuantitySequenceToParts
java.util.List<Part> formatQuantitySequenceToParts(java.util.List<Quantity> qty, UnitFormatOptions options)
Formats the given unit quantity sequence to an array of parts.
-
getUnitDisplayName
java.lang.String getUnitDisplayName(UnitType unit, UnitLength length)
Returns the display name for the given unit.
-
-