public class Quantity extends RealType
Modifier and Type | Field and Description |
---|---|
protected 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(String name,
String unitSpec)
Constructs from a name and a unit specification.
|
Quantity(String name,
String unitSpec,
SimpleSet set)
Constructs from a name, a unit specification, and a sample set.
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultUnitString()
Return the default unit of this quantity as a string.
|
static Quantity |
getQuantity(String name,
String unitSpec)
create a new Quantity, or return it if it already exists
|
static Quantity |
getQuantity(String name,
String unitSpec,
SimpleSet set)
create a new Quantity, or return it if it already exists
|
static Quantity |
getQuantityByName(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, unary
alias, compareTo, getAlias, getName, getNameWithBlanks, getOriginalName, getScalarTypeByName, hashCode, readResolve, validateName
addTimeAlias, findScalarType, guessMaps, prettyString, stringToType, toString
protected final String unitSpec
public Quantity(String name, 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(String name, 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 String getDefaultUnitString()
null
if no such unit.public static Quantity getQuantity(String name, String unitSpec, SimpleSet set) throws ParseException
ParseException
public static Quantity getQuantity(String name, String unitSpec) throws ParseException
ParseException
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.