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()
Unit
public abstract java.lang.String symbol()
Unit
public abstract double fromSim(double x)
Unit
public double toSim(double x)
Unit
public boolean prefixAllowed()
Unit
prefixAllowed
in interface Unit