java.io.Serializable
Angle
, Area
, Charge
, CompoundDimension
, Current
, DimensionRatio
, Dipole
, ElectricPotential
, Energy
, Force
, Fraction
, Frequency
, Length
, LuminousIntensity
, Mass
, Momentum
, Null
, Power
, Pressure
, Pressure2D
, Quantity
, Temperature
, Time
, Undefined
, Velocity
, Viscosity
, Volume
, Wavenumber
public class Dimension
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
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 | Description |
---|---|
Dimension(java.lang.String name,
double[] signature) |
|
Dimension(java.lang.String name,
double length,
double mass,
double time) |
|
Dimension(java.lang.String name,
double length,
double mass,
double time,
double current,
double temperature,
double number,
double luminosity) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.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(java.lang.Object obj,
java.lang.String property,
java.beans.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.
|
java.lang.String |
toString() |
public static final int N_BASE
public static Dimension MIXED
public Dimension(java.lang.String name, double length, double mass, double time)
public Dimension(java.lang.String name, double length, double mass, double time, double current, double temperature, double number, double luminosity)
public Dimension(java.lang.String name, double[] signature)
public Unit getUnit(UnitSystem unitSystem)
public java.lang.String toString()
toString
in class java.lang.Object
public double[] signature()
public boolean equals(java.lang.Object dim)
equals
in class java.lang.Object
public static Dimension introspect(java.lang.Object obj, java.lang.String property, java.beans.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