public abstract class AbstractSystemOfUnits extends Object implements javax.measure.spi.SystemOfUnits
An abstract base class for unit systems.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractSystemOfUnits.Helper |
| Modifier and Type | Field and Description |
|---|---|
protected static double |
E
The natural logarithm.
|
protected static Logger |
logger |
protected Map<Class<? extends javax.measure.Quantity>,javax.measure.Unit> |
quantityToUnit
Holds the mapping quantity to unit.
|
protected Set<javax.measure.Unit<?>> |
units
Holds the units.
|
| Constructor and Description |
|---|
AbstractSystemOfUnits() |
| Modifier and Type | Method and Description |
|---|---|
protected <U extends javax.measure.Unit<?>> |
addUnit(U unit,
String name)
Adds a new named unit to the collection.
|
protected <U extends javax.measure.Unit<?>> |
addUnit(U unit,
String name,
String symbol)
Adds a new named unit to the collection.
|
abstract String |
getName() |
<Q extends javax.measure.Quantity<Q>> |
getUnit(Class<Q> quantityType) |
Set<javax.measure.Unit<?>> |
getUnits() |
Set<? extends javax.measure.Unit<?>> |
getUnits(javax.measure.Dimension dimension) |
protected final Map<Class<? extends javax.measure.Quantity>,javax.measure.Unit> quantityToUnit
protected static final double E
public AbstractSystemOfUnits()
public abstract String getName()
getName in interface javax.measure.spi.SystemOfUnitspublic Set<javax.measure.Unit<?>> getUnits()
getUnits in interface javax.measure.spi.SystemOfUnitspublic Set<? extends javax.measure.Unit<?>> getUnits(javax.measure.Dimension dimension)
getUnits in interface javax.measure.spi.SystemOfUnitspublic <Q extends javax.measure.Quantity<Q>> javax.measure.Unit<Q> getUnit(Class<Q> quantityType)
getUnit in interface javax.measure.spi.SystemOfUnitsprotected <U extends javax.measure.Unit<?>> U addUnit(U unit, String name, String symbol)
unit - the unit being added.name - the name of the unit.name - the symbol of the unit.unit.Copyright © 2005–2016 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.