|
JScience v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.physics.units.Dimension
public final class Dimension
This class represents an unit dimension. Two units u1
and u2 are compatible if and
only if (u1.getDimension() == u2.getDimension())
Unit.getDimension(),
Serialized Form| Field Summary | |
|---|---|
static Dimension |
AMOUNT_OF_SUBSTANCE
Holds amount of substance dimension (N). |
static Dimension |
ELECTRIC_CURRENT
Holds electric current dimension (I). |
static Dimension |
LENGTH
Holds length dimension (L). |
static Dimension |
LUMINOUS_INTENSITY
Holds luminous intensity dimension (J). |
static Dimension |
MASS
Holds mass dimension (M). |
static Dimension |
NONE
Holds dimensionless. |
static Dimension |
TEMPERATURE
Holds temperature dimension (θ). |
static Dimension |
TIME
Holds time dimension (T). |
| Constructor Summary | |
|---|---|
Dimension(char symbol)
Creates a new dimension associated to the specified symbol. |
|
| Method Summary | |
|---|---|
Dimension |
divide(Dimension that)
Returns the quotient of this dimension with the one specified. |
Dimension |
multiply(Dimension that)
Returns the product of this dimension with the one specified. |
Dimension |
pow(int n)
Returns this dimension raised to an exponent. |
protected java.lang.Object |
readResolve()
Overrides readResolve() to ensure that deserialization
maintains dimension unicity. |
Dimension |
root(int n)
Returns the given root of this dimension. |
java.lang.String |
toString()
Returns the standard String representation of this
dimenstion. |
Text |
toText()
Returns the textual representation of this dimension. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Dimension NONE
public static final Dimension LENGTH
public static final Dimension MASS
public static final Dimension TIME
public static final Dimension ELECTRIC_CURRENT
public static final Dimension TEMPERATURE
public static final Dimension AMOUNT_OF_SUBSTANCE
public static final Dimension LUMINOUS_INTENSITY
| Constructor Detail |
|---|
public Dimension(char symbol)
symbol - the symbol for this dimension.
java.lang.IllegalArgumentException - if the specified symbol is already
associated to an existing dimension.| Method Detail |
|---|
public final Dimension multiply(Dimension that)
that - the dimension multiplicand.
this * thatpublic final Dimension divide(Dimension that)
that - the dimension divisor.
this / thatpublic final Dimension pow(int n)
n - the exponent.
public final Dimension root(int n)
n - the root's order.
java.lang.ArithmeticException - if n == 0.public Text toText()
public final java.lang.String toString()
String representation of this
dimenstion.
toString in class java.lang.ObjecttoText().toString();protected java.lang.Object readResolve()
readResolve() to ensure that deserialization
maintains dimension unicity.
|
JScience v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||