|
|||||||||
| 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(String id,
double value)
Constructs from an identifier and a value. |
| Method Summary | |
|---|---|
abstract int |
compareTo(Object obj)
Compares this prefix to another. |
abstract int |
compareTo(String string)
Compares this prefix to a string. |
String |
getID()
Gets the prefix identifier. |
double |
getValue()
Gets the prefix value. |
int |
length()
Return the length of the prefix identifier. |
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(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 String getID()
public final String toString()
toString in class Objectpublic final double getValue()
public abstract int compareTo(Object obj)
compareTo in interface Comparable<Object>obj - The other prefix.
obj.public abstract int compareTo(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 | ||||||||