|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Unit
Interface used to specify the physical units to be used when inputting or
outputting a quantity. All internal calculations are performed using
simulation units, which are all derived from the picosecond, Dalton, and
Angstrom. Classes implementing this interface convert the simulation units
to a more common unit for interfacing with the user.
I/O classes (normally Device and Display) have associated with them a
class that implements the Unit interface. In addition to providing
conversions, the unit class also provides textual labels that can be used by
a Device or Display to indicate the units is it using.
| Method Summary | |
|---|---|
Dimension |
dimension()
Returns the dimension of the unit. |
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. |
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. |
| Method Detail |
|---|
Dimension dimension()
double toSim(double x)
x - a value in units of the class
double fromSim(double x)
x - a value in simulation units
String symbol()
boolean prefixAllowed()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||