Package ucar.visad.quantities
Class ScalarQuantity
java.lang.Object
ucar.visad.quantities.Quantity
ucar.visad.quantities.ScalarQuantity
- Direct Known Subclasses:
Acceleration
,Altitude
,CAPE
,CIN
,Density
,Direction
,GasConstant
,GeopotentialAltitude
,LatentHeatOfEvaporation
,Length
,MassicEnergy
,MassicVolume
,MolecularWeightOfDryAir
,MolecularWeightOfWater
,Pressure
,PseudoAdiabaticLapseRate
,RelativeHumidity
,SpecificHeatCapacityOfDryAir
,SpecificHumidity
,Speed
,Temperature
,WaterVaporMixingRatio
,WindComponent
Provides support for scalar quantities.
- Version:
- $Id: ScalarQuantity.java,v 1.11 2005/05/13 18:35:44 jeffmc Exp $
- Author:
- Steven R. Emmerson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ScalarQuantity
(String name, Unit unit, Set set) Constructs from a name, default unit, and default sampling set.protected
ScalarQuantity
(RealTupleType realTupleType) Constructs from an existingRealTupleType
.protected
ScalarQuantity
(RealType realType) Constructs from an existingRealType
.protected
ScalarQuantity
(RealType realType, CoordinateSystem defaultCS) Constructs from an existingRealType
and defaultCoordinateSystem
.protected
ScalarQuantity
(RealType realType, CoordinateSystem defaultCS, Set defaultSet) Constructs from an existingRealType
, defaultCoordinateSystem
, and default sampling set. -
Method Summary
Modifier and TypeMethodDescriptionprotected static RealType
getRealType
(String name, Unit unit) Returns aRealType
that is compatible with this class given a name and a compatible unit.protected static RealType
getRealType
(String name, Unit unit, Set set) Returns aRealType
that is compatible with this class given a name, a compatible unit, and a compatible sampling set.protected final RealType
realType()
Returns the associatedRealType
.Methods inherited from class ucar.visad.quantities.Quantity
realTupleType, setRealTupleType
-
Constructor Details
-
ScalarQuantity
Constructs from a name, default unit, and default sampling set.- Parameters:
name
- The name.unit
- The default unit.set
- The default sampling set.- Throws:
VisADException
- if a core VisAD failure occurs.
-
ScalarQuantity
Constructs from an existingRealType
.- Parameters:
realType
- The existing RealType.- Throws:
VisADException
- if a core VisAD failure occurs.
-
ScalarQuantity
Constructs from an existingRealType
and defaultCoordinateSystem
.- Parameters:
realType
- The existing RealType.defaultCS
- The default CoordinateSystem.- Throws:
VisADException
- if a core VisAD failure occurs.
-
ScalarQuantity
protected ScalarQuantity(RealType realType, CoordinateSystem defaultCS, Set defaultSet) throws VisADException Constructs from an existingRealType
, defaultCoordinateSystem
, and default sampling set.- Parameters:
realType
- The existing RealType.defaultCS
- The default CoordinateSystem.defaultSet
- The default sampling set.- Throws:
VisADException
- if a core VisAD failure occurs.
-
ScalarQuantity
Constructs from an existingRealTupleType
.- Parameters:
realTupleType
- The existing RealTupleType.
-
-
Method Details
-
getRealType
Returns aRealType
that is compatible with this class given a name and a compatible unit.- Parameters:
name
- The name for the RealType.unit
- A compatible unit for the RealType.- Returns:
- A corresponding RealType.
- Throws:
TypeException
- if a necessary RealType can't be created.VisADException
- if a core VisAD failure occurs.
-
getRealType
protected static RealType getRealType(String name, Unit unit, Set set) throws TypeException, VisADException Returns aRealType
that is compatible with this class given a name, a compatible unit, and a compatible sampling set.- Parameters:
name
- The name for the RealType.unit
- A compatible unit for the RealType.set
- A compatible sampling set for the RealType.- Returns:
- A corresponding RealType.
- Throws:
TypeException
- if a necessary RealType can't be created.VisADException
- if a core VisAD failure occurs.
-
realType
Returns the associatedRealType
.- Returns:
- The associated
RealType
. - Throws:
VisADException
-