public final class QuantityDimension
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object obj)
Compare this dimension of a quantity to another.
|
QuantityDimension |
divide(QuantityDimension that)
Divide this dimension of a quantity by another.
|
boolean |
equals(java.lang.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(java.lang.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.
|
java.lang.String |
toString()
Return a string representation of this dimension of a quantity.
|
public QuantityDimension()
public QuantityDimension(QuantityDimension that)
public QuantityDimension(Unit unit) throws UnitException
UnitExceptionpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic QuantityDimension raise(int power)
public QuantityDimension multiply(QuantityDimension that)
public QuantityDimension divide(QuantityDimension that)
public boolean isDimensionless()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)