|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.units.Factor
public final class Factor
Provides support for a Base/exponent pair. Instances of this class are immutable.
| Constructor Summary | |
|---|---|
Factor(Base base)
Constructs from a Base. |
|
Factor(Base base,
int exponent)
Constructs from a Base and an exponent. |
|
Factor(Factor factor,
int exponent)
Constructs from a Factor and an exponent. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Indicates if this Factor is semantically identical to another object. |
Base |
getBase()
Returns the Base entity. |
int |
getExponent()
Returns the exponent of the Base entity. |
java.lang.String |
getID()
Returns the identifier of the Base entity. |
boolean |
isDimensionless()
Indicates if this factor is dimensionless. |
boolean |
isReciprocalOf(Factor that)
Indicates if this Factor is the reciprocal of another Factor. |
Factor |
pow(int power)
Raises this Factor to a power. |
java.lang.String |
toString()
Returns the string representation of this Factor. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Factor(Base base)
base - The base entity.
public Factor(Factor factor,
int exponent)
factor - The factor.exponent - The exponent.
public Factor(Base base,
int exponent)
base - The base entity.exponent - The exponent.| Method Detail |
|---|
public Base getBase()
public java.lang.String getID()
public int getExponent()
public Factor pow(int power)
power - The power by which to raise this Factor.
public final java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object.
true if and only if this Factor
is semantically identical to object<
/code>.public boolean isReciprocalOf(Factor that)
that - The other factor.
true if and only if this Factor
is the reciprocal of that.public boolean isDimensionless()
true if and only if this Factor is
dimensionless.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||