Package tech.units.indriya
Class AbstractSystemOfUnits.Helper
- java.lang.Object
-
- tech.units.indriya.AbstractSystemOfUnits.Helper
-
- Enclosing class:
- AbstractSystemOfUnits
protected static class AbstractSystemOfUnits.Helper extends Object
Static helper class.- Since:
- 1.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <U extends Unit<?>>
UaddUnit(Set<Unit<?>> units, U unit, String name)Adds a new named unit to a collection.static <U extends Unit<?>>
UaddUnit(Set<Unit<?>> units, U unit, String name, String symbol)Adds a new named unit to a collection.static <U extends Unit<?>>
UaddUnit(Set<Unit<?>> units, U unit, String name, String symbol, UnitStyle style)Adds a new named unit to a set.static <U extends Unit<?>>
UaddUnit(Set<Unit<?>> units, U unit, String text, UnitStyle style)Adds a new labeled unit to a set.
-
-
-
Constructor Detail
-
Helper
protected Helper()
-
-
Method Detail
-
addUnit
public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, String name)
Adds a new named unit to a collection.- Parameters:
units- the collection to add to.unit- the unit being added.name- the name of the unit.- Returns:
unit.- Since:
- 1.0
-
addUnit
public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, String name, String symbol)
Adds a new named unit to a collection.- Parameters:
units- the collection to add to.unit- the unit being added.name- the name of the unit.symbol- the symbol of the unit.- Returns:
unit.- Since:
- 1.0
-
addUnit
public static <U extends Unit<?>> U addUnit(Set<Unit<?>> units, U unit, String name, String symbol, UnitStyle style)
Adds a new named unit to a set.- Parameters:
units- the set to add to.unit- the unit being added.name- the name of the unit.symbol- the symbol of the unit.style- style of the unit.- Returns:
unit.- Since:
- 1.0.1
-
-