Class Units

java.lang.Object
tech.units.indriya.AbstractSystemOfUnits
com.dlsc.unitfx.util.Units
All Implemented Interfaces:
javax.measure.spi.SystemOfUnits, tech.uom.lib.common.function.Nameable

public final class Units
extends tech.units.indriya.AbstractSystemOfUnits
Customized system of units that incorporates all available units in all dimensions supported by the QuantityInputField.
  • Nested Class Summary

    Nested classes/interfaces inherited from class tech.units.indriya.AbstractSystemOfUnits

    tech.units.indriya.AbstractSystemOfUnits.Helper
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static javax.measure.Unit<javax.measure.quantity.Temperature> CELSIUS  
    static javax.measure.Unit<javax.measure.quantity.Length> CENTIMETRE  
    static javax.measure.Unit<javax.measure.quantity.Angle> DEGREE  
    static javax.measure.Unit<javax.measure.quantity.Length> FOOT  
    static javax.measure.Unit<javax.measure.quantity.Mass> GRAM  
    static javax.measure.Unit<javax.measure.quantity.Length> INCH  
    static javax.measure.Unit<javax.measure.quantity.Temperature> KELVIN  
    static javax.measure.Unit<javax.measure.quantity.Mass> KILOGRAM  
    static javax.measure.Unit<javax.measure.quantity.Length> KILOMETRE  
    static javax.measure.Unit<javax.measure.quantity.Speed> KILOMETRE_PER_HOUR  
    static javax.measure.Unit<javax.measure.quantity.Speed> KNOT  
    static javax.measure.Unit<javax.measure.quantity.Length> METRE  
    static javax.measure.Unit<javax.measure.quantity.Speed> METRE_PER_SECOND  
    static javax.measure.Unit<javax.measure.quantity.Mass> MILLIGRAM  
    static javax.measure.Unit<javax.measure.quantity.Length> MILLIMETRE  
    static javax.measure.Unit<javax.measure.quantity.Length> NAUTICAL_MILE  

    Fields inherited from class tech.units.indriya.AbstractSystemOfUnits

    E, logger, quantityToUnit, units
  • Method Summary

    Modifier and Type Method Description
    static Units getInstance()  
    String getName()  
    <Q extends javax.measure.Quantity<Q>>
    List<javax.measure.Unit<Q>>
    getUnits​(Class<Q> type)
    Allows to get the list of units registered for the given quantity type.

    Methods inherited from class tech.units.indriya.AbstractSystemOfUnits

    getUnit, getUnit, getUnit, getUnit, getUnits, getUnits

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GRAM

      public static final javax.measure.Unit<javax.measure.quantity.Mass> GRAM
    • MILLIGRAM

      public static final javax.measure.Unit<javax.measure.quantity.Mass> MILLIGRAM
    • KILOGRAM

      public static final javax.measure.Unit<javax.measure.quantity.Mass> KILOGRAM
    • METRE

      public static final javax.measure.Unit<javax.measure.quantity.Length> METRE
    • CENTIMETRE

      public static final javax.measure.Unit<javax.measure.quantity.Length> CENTIMETRE
    • MILLIMETRE

      public static final javax.measure.Unit<javax.measure.quantity.Length> MILLIMETRE
    • KILOMETRE

      public static final javax.measure.Unit<javax.measure.quantity.Length> KILOMETRE
    • FOOT

      public static final javax.measure.Unit<javax.measure.quantity.Length> FOOT
    • INCH

      public static final javax.measure.Unit<javax.measure.quantity.Length> INCH
    • NAUTICAL_MILE

      public static final javax.measure.Unit<javax.measure.quantity.Length> NAUTICAL_MILE
    • CELSIUS

      public static final javax.measure.Unit<javax.measure.quantity.Temperature> CELSIUS
    • KELVIN

      public static final javax.measure.Unit<javax.measure.quantity.Temperature> KELVIN
    • DEGREE

      public static final javax.measure.Unit<javax.measure.quantity.Angle> DEGREE
    • METRE_PER_SECOND

      public static final javax.measure.Unit<javax.measure.quantity.Speed> METRE_PER_SECOND
    • KILOMETRE_PER_HOUR

      public static final javax.measure.Unit<javax.measure.quantity.Speed> KILOMETRE_PER_HOUR
    • KNOT

      public static final javax.measure.Unit<javax.measure.quantity.Speed> KNOT
  • Method Details

    • getInstance

      public static Units getInstance()
    • getName

      public String getName()
      Specified by:
      getName in interface tech.uom.lib.common.function.Nameable
      Specified by:
      getName in interface javax.measure.spi.SystemOfUnits
      Specified by:
      getName in class tech.units.indriya.AbstractSystemOfUnits
    • getUnits

      public <Q extends javax.measure.Quantity<Q>> List<javax.measure.Unit<Q>> getUnits​(Class<Q> type)
      Allows to get the list of units registered for the given quantity type.
      Type Parameters:
      Q - The quantity type.
      Parameters:
      type - The quantity type class.
      Returns:
      The list of registered units in this system of units.