|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.units.Prefix
public abstract class Prefix
Provides support for unit prefixes (e.g. "centi", "c"). Instances of this class are immutable.
| Constructor Summary | |
|---|---|
protected |
Prefix(java.lang.String id,
double value)
Constructs from an identifier and a value. |
| Method Summary | |
|---|---|
abstract int |
compareTo(java.lang.Object obj)
Compares this prefix to another. |
abstract int |
compareTo(java.lang.String string)
Compares this prefix to a string. |
java.lang.String |
getID()
Gets the prefix identifier. |
double |
getValue()
Gets the prefix value. |
int |
length()
Return the length of the prefix identifier. |
java.lang.String |
toString()
Returns the string representation of this prefix. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Prefix(java.lang.String id,
double value)
id - The prefix identifier (e.g. "milli" or "m").value - The prefix value (e.g. 1e-3).| Method Detail |
|---|
public final java.lang.String getID()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final double getValue()
public abstract int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - The other prefix.
obj.public abstract int compareTo(java.lang.String string)
string - The string.
public final int length()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||