public class Quantity extends RealType
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
unitSpec
The specification of the preferred unit of the quantity.
|
Altitude, Declination, Generic, INTERVAL, Latitude, Longitude, Radius, RightAscension, Time, TimeInterval, XAxis, YAxis, ZAxis| Constructor and Description |
|---|
Quantity(java.lang.String name,
java.lang.String unitSpec)
Constructs from a name and a unit specification.
|
Quantity(java.lang.String name,
java.lang.String unitSpec,
SimpleSet set)
Constructs from a name, a unit specification, and a sample set.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDefaultUnitString()
Return the default unit of this quantity as a string.
|
static Quantity |
getQuantity(java.lang.String name,
java.lang.String unitSpec)
create a new Quantity, or return it if it already exists
|
static Quantity |
getQuantity(java.lang.String name,
java.lang.String unitSpec,
SimpleSet set)
create a new Quantity, or return it if it already exists
|
static Quantity |
getQuantityByName(java.lang.String name)
return any Quantity constructed in this JVM with name,
or null
|
binary, buildShadowType, cloneDerivative, equals, equalsExceptName, equalsExceptNameButUnits, getAttributeMask, getDefaultSet, getDefaultUnit, getRealType, getRealType, getRealType, getRealType, getRealType, getRealType, getRealTypeByName, isInterval, main, missingData, prettyString, setDefaultSet, unaryalias, compareTo, getAlias, getName, getNameWithBlanks, getOriginalName, getScalarTypeByName, hashCode, readResolve, validateNameaddTimeAlias, findScalarType, guessMaps, prettyString, stringToType, toStringprotected final java.lang.String unitSpec
public Quantity(java.lang.String name,
java.lang.String unitSpec,
SimpleSet set)
throws VisADException,
ParseException
name - The name of the quantity (e.g. "length").unitSpec - The preferred unit for the quantity
(e.g. "feet").set - The default sample set for the quantity. May be
null.ParseException - Couldn't decode unit specification.VisADException - ScalarType of same name already exists.public Quantity(java.lang.String name,
java.lang.String unitSpec)
throws VisADException,
ParseException
name - The name of the quantity (e.g. "length").unitSpec - The preferred unit for the quantity
(e.g. "feet").VisADException - Can't create necessary VisAD object.ParseException - Couldn't decode unit specification.public java.lang.String getDefaultUnitString()
null if no such unit.public static Quantity getQuantity(java.lang.String name, java.lang.String unitSpec, SimpleSet set) throws ParseException
ParseExceptionpublic static Quantity getQuantity(java.lang.String name, java.lang.String unitSpec) throws ParseException
ParseExceptionpublic static Quantity getQuantityByName(java.lang.String name)