|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visad.QuantityDimension
public final class QuantityDimension
This class represents the dimension of a quantity. For example, consider a nonrelativistic particle of mass m in uniform motion which travels a distance l in a time t. Its velocity is v=l/t and its kinetic energy is E=mv2/2=ml2t-2/2. The dimension of E is dim E=ML2T-2 and the dimensional exponents are 1, 2, and -2. A QuantityDimension is immutable.
Constructor Summary | |
---|---|
QuantityDimension()
Constructs from nothing (i.e. constructs a dimensionless quantity). |
|
QuantityDimension(QuantityDimension that)
Constructs from another dimension of a quantity. |
|
QuantityDimension(Unit unit)
Constructs from an existing Unit. |
Method Summary | |
---|---|
int |
compareTo(Object obj)
Compare this dimension of a quantity to another. |
QuantityDimension |
divide(QuantityDimension that)
Divide this dimension of a quantity by another. |
boolean |
equals(Object obj)
Indicate whether or not this dimension of a quantity is the same as another. |
boolean |
isDimensionless()
Indicate whether or not this dimension of a quantity is dimensionless. |
static void |
main(String[] args)
Test this class. |
QuantityDimension |
multiply(QuantityDimension that)
Multiply this dimension of a quantity by another. |
QuantityDimension |
raise(int power)
Raise this dimension of a quantity by a power. |
String |
toString()
Return a string representation of this dimension of a quantity. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QuantityDimension()
public QuantityDimension(QuantityDimension that)
public QuantityDimension(Unit unit) throws UnitException
UnitException
Method Detail |
---|
public int compareTo(Object obj)
compareTo
in interface Comparable
public boolean equals(Object obj)
equals
in class Object
public QuantityDimension raise(int power)
public QuantityDimension multiply(QuantityDimension that)
public QuantityDimension divide(QuantityDimension that)
public boolean isDimensionless()
public String toString()
toString
in class Object
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |