Package tech.units.indriya
Class AbstractSystemOfUnits.Helper
java.lang.Object
tech.units.indriya.AbstractSystemOfUnits.Helper
- Enclosing class:
AbstractSystemOfUnits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <U extends javax.measure.Unit<?>>
UAdds a new named unit to the collection.static <U extends javax.measure.Unit<?>>
UAdds a new named unit to the collection.static <U extends javax.measure.Unit<?>>
UAdds a new named unit to the collection.static <U extends javax.measure.Unit<?>>
UAdds a new labeled unit to the set.(package private) static Set
<javax.measure.Unit<?>> getUnitsOfDimension
(Set<javax.measure.Unit<?>> units, javax.measure.Dimension dimension)
-
Constructor Details
-
Helper
protected Helper()
-
-
Method Details
-
getUnitsOfDimension
-
addUnit
public static <U extends javax.measure.Unit<?>> U addUnit(Set<javax.measure.Unit<?>> units, U unit, 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(Set<javax.measure.Unit<?>> units, U unit, String name, 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(Set<javax.measure.Unit<?>> units, U unit, String name, String symbol, UnitStyle style) Adds a new named unit to the collection.- Parameters:
unit
- the unit being added.name
- the name of the unit.style
- style of the unit.name
- the symbol of the unit.- Returns:
unit
.- Since:
- 1.0.1
-
addUnit
public static <U extends javax.measure.Unit<?>> U addUnit(Set<javax.measure.Unit<?>> units, U unit, 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
-