gnu.math
Class NamedUnit
java.lang.Object
java.lang.Number
gnu.math.Numeric
gnu.math.Quantity
gnu.math.Unit
gnu.math.NamedUnit
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable
- Direct Known Subclasses:
- BaseUnit
public class NamedUnit
- extends Unit
- implements java.io.Externalizable
A Unit that has a name.
- See Also:
- Serialized Form
Fields inherited from class gnu.math.Unit |
cm, Empty, gram, hour, in, meter, minute, mm, pica, pt, radian, second |
Methods inherited from class gnu.math.Unit |
define, define, dimensions, divide, doubleValue, hashCode, isExact, isZero, number, pow, power, sqrt, times, toString, toString, toString, unit |
Methods inherited from class gnu.math.Quantity |
abs, add, add, addReversed, compare, compare, compareReversed, div, divide, divReversed, doubleImagValue, im, imValue, make, make, make, mul, mulReversed, neg, re, reValue, times, toString |
Methods inherited from class java.lang.Number |
byteValue, shortValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NamedUnit
public NamedUnit()
NamedUnit
public NamedUnit(java.lang.String name,
DQuantity value)
NamedUnit
public NamedUnit(java.lang.String name,
double factor,
Unit base)
init
protected void init()
getName
public java.lang.String getName()
- Overrides:
getName
in class Unit
lookup
public static NamedUnit lookup(java.lang.String name)
lookup
public static NamedUnit lookup(java.lang.String name,
double scale,
Unit base)
make
public static NamedUnit make(java.lang.String name,
double scale,
Unit base)
make
public static NamedUnit make(java.lang.String name,
Quantity value)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
readResolve
public java.lang.Object readResolve()
throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException