Package ucar.units
Class PrefixName
- java.lang.Object
-
- ucar.units.Prefix
-
- ucar.units.PrefixName
-
- All Implemented Interfaces:
Comparable<Object>
@Immutable public final class PrefixName extends Prefix
Provides support for prefix names and numeric values. Instances of this class are immutable.
-
-
Constructor Summary
Constructors Constructor Description PrefixName(String name, double value)
Constructs from a name and a numeric value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object obj)
Compares this PrefixName with another PrefixName.int
compareTo(String string)
Compares this PrefixName with a string.
-
-
-
Constructor Detail
-
PrefixName
public PrefixName(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.
-
-
Method Detail
-
compareTo
public final int compareTo(Object obj)
Compares this PrefixName with another PrefixName.- Specified by:
compareTo
in interfaceComparable<Object>
- Specified by:
compareTo
in classPrefix
- 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(String string)
Compares this PrefixName with a string.
-
-