ucar.visad.quantities
Class ScalarQuantity

java.lang.Object
  extended by ucar.visad.quantities.Quantity
      extended by 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

public abstract class ScalarQuantity
extends Quantity

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
protected ScalarQuantity(RealTupleType realTupleType)
          Constructs from an existing RealTupleType.
protected ScalarQuantity(RealType realType)
          Constructs from an existing RealType.
protected ScalarQuantity(RealType realType, CoordinateSystem defaultCS)
          Constructs from an existing RealType and default CoordinateSystem.
protected ScalarQuantity(RealType realType, CoordinateSystem defaultCS, Set defaultSet)
          Constructs from an existing RealType, default CoordinateSystem, and default sampling set.
protected ScalarQuantity(String name, Unit unit, Set set)
          Constructs from a name, default unit, and default sampling set.
 
Method Summary
protected static RealType getRealType(String name, Unit unit)
          Returns a RealType that is compatible with this class given a name and a compatible unit.
protected static RealType getRealType(String name, Unit unit, Set set)
          Returns a RealType that is compatible with this class given a name, a compatible unit, and a compatible sampling set.
protected  RealType realType()
          Returns the associated RealType.
 
Methods inherited from class ucar.visad.quantities.Quantity
realTupleType, setRealTupleType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalarQuantity

protected ScalarQuantity(String name,
                         Unit unit,
                         Set set)
                  throws VisADException
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

protected ScalarQuantity(RealType realType)
                  throws VisADException
Constructs from an existing RealType.

Parameters:
realType - The existing RealType.
Throws:
VisADException - if a core VisAD failure occurs.

ScalarQuantity

protected ScalarQuantity(RealType realType,
                         CoordinateSystem defaultCS)
                  throws VisADException
Constructs from an existing RealType and default CoordinateSystem.

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 existing RealType, default CoordinateSystem, 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

protected ScalarQuantity(RealTupleType realTupleType)
Constructs from an existing RealTupleType.

Parameters:
realTupleType - The existing RealTupleType.
Method Detail

getRealType

protected static RealType getRealType(String name,
                                      Unit unit)
                               throws TypeException,
                                      VisADException
Returns a RealType 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 a RealType 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

protected final RealType realType()
                           throws VisADException
Returns the associated RealType.

Returns:
The associated RealType.
Throws:
VisADException