@Immutable
public final class Factor
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
int |
hashCode()
Returns the hash code of this instance.
|
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.
|
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.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 int hashCode()
hashCode in class java.lang.Objectpublic 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.