ucar.units
Class PrefixName
java.lang.Object
ucar.units.Prefix
ucar.units.PrefixName
- All Implemented Interfaces:
- java.lang.Comparable<java.lang.Object>
public final class PrefixName
- extends Prefix
Provides support for prefix names and numeric values.
Instances of this class are immutable.
- Version:
- $Id: PrefixName.java 64 2006-07-12 22:30:50Z edavis $
- Author:
- Steven R. Emmerson
|
Constructor Summary |
PrefixName(java.lang.String name,
double value)
Constructs from a name and a numeric value. |
|
Method Summary |
int |
compareTo(java.lang.Object obj)
Compares this PrefixName with another PrefixName. |
int |
compareTo(java.lang.String string)
Compares this PrefixName with a string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PrefixName
public PrefixName(java.lang.String name,
double value)
- Constructs from a name and a numeric value.
- Parameters:
name - The name for the prefix.value - The numeric value for the prefix.
compareTo
public final int compareTo(java.lang.Object obj)
- Compares this PrefixName with another PrefixName.
- Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>- Specified by:
compareTo in class Prefix
- Parameters:
obj - The other PrefixName.
- Returns:
- A negative value, zero, or a positive value
depending on whether this PrefixName is less
than, equal to, or greater than
obj, respectively.
compareTo
public final int compareTo(java.lang.String string)
- Compares this PrefixName with a string.
- Specified by:
compareTo in class Prefix
- Parameters:
string - The string to compare this PrefixName against.
- Returns:
- A negative value, zero, or a positive value
depending on whether this PrefixName is less
than, equal to, or greater than
string, respectively.