Class AbstractSystemOfUnits

  • All Implemented Interfaces:
    javax.measure.spi.SystemOfUnits, tech.uom.lib.common.function.Nameable
    Direct Known Subclasses:
    Units

    public abstract class AbstractSystemOfUnits
    extends java.lang.Object
    implements javax.measure.spi.SystemOfUnits, tech.uom.lib.common.function.Nameable

    An abstract base class for unit systems.

    Since:
    1.0
    Version:
    1.1, April 1, 2018
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static double E
      The natural logarithm.
      protected static java.util.logging.Logger logger  
      protected java.util.Map<java.lang.Class<? extends javax.measure.Quantity>,​javax.measure.Unit> quantityToUnit
      Holds the mapping quantity to unit.
      protected java.util.Set<javax.measure.Unit<?>> units
      Holds the units.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String getName()  
      <Q extends javax.measure.Quantity<Q>>
      javax.measure.Unit<Q>
      getUnit​(java.lang.Class<Q> quantityType)  
      java.util.Set<javax.measure.Unit<?>> getUnits()  
      java.util.Set<? extends javax.measure.Unit<?>> getUnits​(javax.measure.Dimension dimension)  
      • Methods inherited from class java.lang.Object

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

      • units

        protected final java.util.Set<javax.measure.Unit<?>> units
        Holds the units.
      • quantityToUnit

        protected final java.util.Map<java.lang.Class<? extends javax.measure.Quantity>,​javax.measure.Unit> quantityToUnit
        Holds the mapping quantity to unit.
      • logger

        protected static final java.util.logging.Logger logger
    • Constructor Detail

      • AbstractSystemOfUnits

        public AbstractSystemOfUnits()
    • Method Detail

      • getName

        public abstract java.lang.String getName()
        Specified by:
        getName in interface tech.uom.lib.common.function.Nameable
        Specified by:
        getName in interface javax.measure.spi.SystemOfUnits
      • getUnits

        public java.util.Set<javax.measure.Unit<?>> getUnits()
        Specified by:
        getUnits in interface javax.measure.spi.SystemOfUnits
      • getUnits

        public java.util.Set<? extends javax.measure.Unit<?>> getUnits​(javax.measure.Dimension dimension)
        Specified by:
        getUnits in interface javax.measure.spi.SystemOfUnits
      • getUnit

        public <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> getUnit​(java.lang.Class<Q> quantityType)
        Specified by:
        getUnit in interface javax.measure.spi.SystemOfUnits