ucar.visad
Class TupleQuantity

java.lang.Object
  extended by ucar.visad.Quantity
      extended by ucar.visad.TupleQuantity

public abstract class TupleQuantity
extends Quantity

Provides support for tuple quantities. This class uses the decorator design pattern to add convenience methods to its superclass and to form the root of a hierarchy of classes that serve to encapsulate knowledge about scientific quantities that either have multiple components or a reference coordinate system.

Version:
$Revision: 1.16 $ $Date: 2005/05/13 18:34:05 $
Author:
Steven R. Emmerson

Field Summary
 
Fields inherited from class ucar.visad.Quantity
DEPENDENT, INDEPENDENT, UNIMPORTANT
 
Constructor Summary
protected TupleQuantity(String name, ScalarQuantity[] scalars)
          Constructs from a name and scalar quantities.
protected TupleQuantity(String name, ScalarQuantity[] scalars, CoordinateSystem coordSys)
          Constructs from a name, scalar quantities, and a default coordinate system transformation.
protected TupleQuantity(String name, ScalarQuantity[] scalars, CoordinateSystem coordSys, Set domain)
          Constructs from a name, scalar quantities, a default coordinate system transformation, and a default domain set.
 
Method Summary
protected static RealType[] getRealTypes(ScalarQuantity[] scalars)
          Returns an array of VisAD RealTypes corresponding to an array of scalar quantitities.
 
Methods inherited from class ucar.visad.Quantity
getMathType, getName, getRealTupleType, isCompatible, isCompatible, newRealTuple, newRealTuple, newRealTuple, newRealTuple, newValue, vet, vet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleQuantity

protected TupleQuantity(String name,
                        ScalarQuantity[] scalars)
                 throws VisADException
Constructs from a name and scalar quantities. The default coordinate system transformation will be null.

Parameters:
name - The name for the tuple quantity.
scalars - The scalar quantities.
Throws:
VisADException - VisAD failure.
See Also:
TupleQuantity(String, ScalarQuantity[], CoordinateSystem)

TupleQuantity

protected TupleQuantity(String name,
                        ScalarQuantity[] scalars,
                        CoordinateSystem coordSys)
                 throws VisADException
Constructs from a name, scalar quantities, and a default coordinate system transformation. The default domain set will be null.

Parameters:
name - The name for the tuple quantity.
scalars - The scalar quantitites.
coordSys - The default coordinate system transformation. May be null.
Throws:
VisADException - VisAD failure.
See Also:
TupleQuantity(String, ScalarQuantity[], CoordinateSystem, visad.Set)

TupleQuantity

protected TupleQuantity(String name,
                        ScalarQuantity[] scalars,
                        CoordinateSystem coordSys,
                        Set domain)
                 throws TypeException,
                        VisADException
Constructs from a name, scalar quantities, a default coordinate system transformation, and a default domain set. This is the most general constructor.

Parameters:
name - The name for the tuple quantity.
scalars - The scalar quantitites.
coordSys - The default coordinate system transformation. May be null.
domain - The default domain set. May be null.
Throws:
TypeException - The quantity already exists.
VisADException - VisAD failure.
Method Detail

getRealTypes

protected static RealType[] getRealTypes(ScalarQuantity[] scalars)
Returns an array of VisAD RealTypes corresponding to an array of scalar quantitities.

Parameters:
scalars - An array of the scalar quantities.
Returns:
A corresponding aray of VisAD RealTypes