Class AbstractSystemOfUnits.Helper

  • Enclosing class:
    AbstractSystemOfUnits

    protected static class AbstractSystemOfUnits.Helper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Helper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <U extends javax.measure.Unit<?>>
      U
      addUnit​(java.util.Set<javax.measure.Unit<?>> units, U unit, java.lang.String name)
      Adds a new named unit to the collection.
      static <U extends javax.measure.Unit<?>>
      U
      addUnit​(java.util.Set<javax.measure.Unit<?>> units, U unit, java.lang.String name, java.lang.String symbol)
      Adds a new named unit to the collection.
      static <U extends javax.measure.Unit<?>>
      U
      addUnit​(java.util.Set<javax.measure.Unit<?>> units, U unit, java.lang.String name, java.lang.String symbol, UnitStyle style)
      Adds a new named unit to the collection.
      static <U extends javax.measure.Unit<?>>
      U
      addUnit​(java.util.Set<javax.measure.Unit<?>> units, U unit, java.lang.String text, UnitStyle style)
      Adds a new labeled unit to the set.
      (package private) static java.util.Set<javax.measure.Unit<?>> getUnitsOfDimension​(java.util.Set<javax.measure.Unit<?>> units, javax.measure.Dimension dimension)  
      • Methods inherited from class java.lang.Object

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

      • Helper

        protected Helper()
    • Method Detail

      • getUnitsOfDimension

        static java.util.Set<javax.measure.Unit<?>> getUnitsOfDimension​(java.util.Set<javax.measure.Unit<?>> units,
                                                                        javax.measure.Dimension dimension)
      • addUnit

        public static <U extends javax.measure.Unit<?>> U addUnit​(java.util.Set<javax.measure.Unit<?>> units,
                                                                  U unit,
                                                                  java.lang.String name)
        Adds a new named unit to the collection.
        Parameters:
        unit - the unit being added.
        name - the name of the unit.
        Returns:
        unit.
        Since:
        1.0
      • addUnit

        public static <U extends javax.measure.Unit<?>> U addUnit​(java.util.Set<javax.measure.Unit<?>> units,
                                                                  U unit,
                                                                  java.lang.String name,
                                                                  java.lang.String symbol)
        Adds a new named unit to the collection.
        Parameters:
        unit - the unit being added.
        name - the name of the unit.
        name - the symbol of the unit.
        Returns:
        unit.
        Since:
        1.0
      • addUnit

        public static <U extends javax.measure.Unit<?>> U addUnit​(java.util.Set<javax.measure.Unit<?>> units,
                                                                  U unit,
                                                                  java.lang.String name,
                                                                  java.lang.String symbol,
                                                                  UnitStyle style)
        Adds a new named unit to the collection.
        Parameters:
        unit - the unit being added.
        name - the name of the unit.
        name - the symbol of the unit.
        style - style of the unit.
        Returns:
        unit.
        Since:
        1.0.1
      • addUnit

        public static <U extends javax.measure.Unit<?>> U addUnit​(java.util.Set<javax.measure.Unit<?>> units,
                                                                  U unit,
                                                                  java.lang.String text,
                                                                  UnitStyle style)
        Adds a new labeled unit to the set.
        Parameters:
        units - the set to add to.
        unit - the unit being added.
        text - the text for the unit.
        style - style of the unit.
        Returns:
        unit.
        Since:
        1.0.1