Package 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:
Externalizable,Serializable
- Direct Known Subclasses:
BaseUnit
public class NamedUnit extends Unit implements Externalizable
A Unit that has a name.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()protected voidinit()static NamedUnitlookup(String name)static NamedUnitlookup(String name, double scale, Unit base)static NamedUnitmake(String name, double scale, Unit base)static NamedUnitmake(String name, Quantity value)voidreadExternal(ObjectInput in)ObjectreadResolve()voidwriteExternal(ObjectOutput out)-
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, doubleJmagValue, doubleKmagValue, im, imValue, jm, jmValue, km, kmValue, make, make, make, mul, mulReversed, neg, re, reValue, times, toString
-
Methods inherited from class gnu.math.Numeric
add, asNumericOrNull, div_inv, equals, floatValue, geq, grt, intValue, longValue, mul_ident, sub, toExact, toInexact
-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Method Detail
-
init
protected void init()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
readResolve
public Object readResolve() throws ObjectStreamException
- Throws:
ObjectStreamException
-
-