public final class BaseUnit<Q extends javax.measure.Quantity<Q>> extends AbstractUnit<Q>
This class represents the building blocks on top of which all others physical units are created. Base units are always unscaled SI units.
When using the standard model, all seven SI base units are dimensionally independent.
name, ONE
Constructor and Description |
---|
BaseUnit(String symbol)
Creates a base unit having the specified symbol and dimension.
|
BaseUnit(String symbol,
javax.measure.Dimension dimension)
Creates a base unit having the specified symbol and dimension.
|
BaseUnit(String symbol,
String name)
Creates a base unit having the specified symbol and name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object that) |
Map<? extends AbstractUnit<Q>,Integer> |
getBaseUnits() |
javax.measure.Dimension |
getDimension() |
String |
getSymbol() |
javax.measure.UnitConverter |
getSystemConverter()
Returns the converter from this unit to its unscaled
standard unit. |
int |
hashCode() |
AbstractUnit<Q> |
toSystemUnit()
Returns the unscaled standard (SI) unit from which this unit is derived.
|
alternate, annotate, asType, compareTo, divide, divide, getConverterTo, getConverterToAny, getName, getSystemUnit, inverse, isCompatible, isSystemUnit, multiply, multiply, multiply, parse, pow, root, setName, setSymbol, shift, toString, transform
public BaseUnit(String symbol, javax.measure.Dimension dimension)
symbol
- the symbol of this base unit.public BaseUnit(String symbol)
symbol
- the symbol of this base unit.public BaseUnit(String symbol, String name)
symbol
- the symbol of this base unit.name
- the name of this base unit.IllegalArgumentException
- if the specified symbol is associated to a different unit.public AbstractUnit<Q> toSystemUnit()
AbstractUnit
static boolean isAngularVelocity(AbstractUnit<?> unit) {
return unit.toSystemUnit().equals(RADIAN.divide(SECOND)); }
assert(REVOLUTION.divide(MINUTE).isAngularVelocity()); // Returns true.
toSystemUnit
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
public javax.measure.UnitConverter getSystemConverter()
AbstractUnit
standard
unit.getSystemConverter
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
getConverterTo(this.toSystemUnit())
AbstractUnit.toSystemUnit()
public javax.measure.Dimension getDimension()
getDimension
in interface javax.measure.Unit<Q extends javax.measure.Quantity<Q>>
getDimension
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
public final boolean equals(Object that)
equals
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
public final int hashCode()
hashCode
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
public Map<? extends AbstractUnit<Q>,Integer> getBaseUnits()
getBaseUnits
in interface javax.measure.Unit<Q extends javax.measure.Quantity<Q>>
getBaseUnits
in class AbstractUnit<Q extends javax.measure.Quantity<Q>>
Copyright © 2005–2017 Jean-Marie Dautelle, Werner Keil, V2COM. All rights reserved.