| Modifier | Constructor | Description |
|---|---|---|
protected |
LJUnit(LJ ljSystem) |
Unit must provide instance of LJ unit system at construction.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract Dimension |
dimension() |
Returns the dimension of the unit.
|
abstract double |
fromSim(double x) |
Takes the given value in simulation units and converts it to class units (considering prefix).
|
boolean |
prefixAllowed() |
Indicates if the unit is appropriate for use with a prefix.
|
abstract java.lang.String |
symbol() |
Returns the symbol of unit, such as "g" for grams.
|
double |
toSim(double x) |
Takes the given value in class units (considering prefix) and converts it to simulation units.
|
protected final LJ lj
protected LJUnit(LJ ljSystem)
public abstract Dimension dimension()
Unitpublic abstract java.lang.String symbol()
Unitpublic abstract double fromSim(double x)
Unitpublic double toSim(double x)
Unitpublic boolean prefixAllowed()
UnitprefixAllowed in interface Unit