|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.units.Dimension
public class Dimension
Parent of all Dimension classes, which describe the physical dimensions (e.g., mass, length, force) of a quantity. All dimensions are derived from seven base dimensions (length, mass, time, electrical current, temperature, number or mole, and luminosity). Dimension is coded as a "signature", which is an array of seven value that are the exponents of these base dimensions forming the specified dimension.
| Field Summary | |
|---|---|
static Dimension |
MIXED
Dimension used to indicate that a group of values are not all of the same dimension. |
static int |
N_BASE
Number of base dimensions, equal to seven. |
| Constructor Summary | |
|---|---|
Dimension(String name,
double[] signature)
|
|
Dimension(String name,
double length,
double mass,
double time)
|
|
Dimension(String name,
double length,
double mass,
double time,
double current,
double temperature,
double number,
double luminosity)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object dim)
Returns true if the given object is a Dimension instance with the same signature as this. |
Unit |
getUnit(UnitSystem unitSystem)
Returns the unit of this dimension as derived in the given system of units. |
static Dimension |
introspect(Object obj,
String property,
BeanInfo beaninfo)
Method to determine the dimension of a property via introspection. |
double[] |
signature()
The signature is the exponents of each of the base dimensions forming the given dimension. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int N_BASE
public static Dimension MIXED
| Constructor Detail |
|---|
public Dimension(String name,
double length,
double mass,
double time)
public Dimension(String name,
double length,
double mass,
double time,
double current,
double temperature,
double number,
double luminosity)
public Dimension(String name,
double[] signature)
| Method Detail |
|---|
public Unit getUnit(UnitSystem unitSystem)
public String toString()
toString in class Objectpublic double[] signature()
public boolean equals(Object dim)
equals in class Object
public static Dimension introspect(Object obj,
String property,
BeanInfo beaninfo)
obj - an instance of the object having the property of interestproperty - the name of the property, such that getPROPERTYDimension would return the dimension of the propertybeaninfo - BeanInfo class obtained by prior introspection of the object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||