@Immutable public abstract class Prefix extends Object implements Comparable<Object>
Modifier | Constructor and Description |
---|---|
protected |
Prefix(String id,
double value)
Constructs from an identifier and a value.
|
Modifier and Type | Method and Description |
---|---|
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.
|
protected Prefix(String id, double value)
id
- The prefix identifier (e.g. "milli" or "m").value
- The prefix value (e.g. 1e-3).public final String getID()
public final String toString()
public 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()
Copyright © 1999–2017 UCAR/Unidata. All rights reserved.