|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.Quantity
public abstract class Quantity
Provides support for quantities (ex: temperature, wind). This class uses the facade design pattern to provide a (hopefully) more convenient API to the RealType, Real, RealTupleType, and RealTuple API-s. It also defines the root of a hierarchy of classes that encapsulate quantity-specific scientific knowledge.
| Field Summary | |
|---|---|
ucar.visad.Quantity.DependenceMode |
DEPENDENT
Indicates that a secondary object will be the same object as the primary object. |
ucar.visad.Quantity.DependenceMode |
INDEPENDENT
Indicates that a secondary object will be a different object than the primary object. |
ucar.visad.Quantity.DependenceMode |
UNIMPORTANT
Indicates that it is irrelevant whether or not a secondary object will be a different object than the primary object. |
| Method Summary | |
|---|---|
MathType |
getMathType()
Returns the natural MathType of this quantity. |
String |
getName()
Returns the name of this quantity. |
RealTupleType |
getRealTupleType()
Returns the VisAD RealTupleType of this quantity. |
boolean |
isCompatible(Data data)
Indicates if a VisAD data object is compatible with this instance. |
boolean |
isCompatible(MathType type)
Indicates if a VisAD MathType is compatible with this instance. |
RealTuple |
newRealTuple(double[] amounts,
Unit[] units)
Returns a single tuple of this quantity. |
RealTuple |
newRealTuple(double[] amounts,
Unit[] units,
CoordinateSystem coordSys)
Returns a single tuple of this quantity. |
RealTuple |
newRealTuple(double[] amounts,
Unit[] units,
ErrorEstimate[] errors,
CoordinateSystem coordSys)
Returns a single tuple of this quantity. |
RealTuple |
newRealTuple(Real[] values,
CoordinateSystem coordSys)
Returns a single tuple of this quantity. |
DataImpl |
newValue(double[] amounts,
Unit[] units,
ErrorEstimate[] errors,
CoordinateSystem coordSys)
Returns a single value of this quantity. |
void |
vet(Data data)
Vets a VisAD data object for compatibility. |
void |
vet(MathType type)
Vets a VisAD MathType for compatibility. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final ucar.visad.Quantity.DependenceMode DEPENDENT
public final ucar.visad.Quantity.DependenceMode INDEPENDENT
public final ucar.visad.Quantity.DependenceMode UNIMPORTANT
| Method Detail |
|---|
public final String getName()
public final RealTupleType getRealTupleType()
RealTupleType of this quantity.
public MathType getMathType()
MathType of this quantity. This method
should be overridden in subclasses when appropriate.
MathType of this quantity.
The class of the object is either RealType or RealTupleType.
public final RealTuple newRealTuple(double[] amounts,
Unit[] units)
throws VisADException,
RemoteException
null.
amounts - The numeric values.units - The units of the numeric values. May be
null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.newRealTuple(double[], Unit[], CoordinateSystem)
public final RealTuple newRealTuple(double[] amounts,
Unit[] units,
CoordinateSystem coordSys)
throws VisADException,
RemoteException
null.
amounts - The numeric values.units - The units of the numeric values. May be
null.coordSys - The coordinate system transformation for this
particular tuple. Must be compatible with the
default coordinate system transformation. May
be null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.newRealTuple(double[], Unit[], ErrorEstimate[], CoordinateSystem)
public RealTuple newRealTuple(double[] amounts,
Unit[] units,
ErrorEstimate[] errors,
CoordinateSystem coordSys)
throws VisADException,
RemoteException
amounts - The numeric values.units - The units of the numeric values. May be
null.errors - The error estimates. May be null.coordSys - The coordinate system transformation for this
particular tuple. Must be compatible with the
default coordinate system transformation. May
be null.
VisADException - VisAD failure.
RemoteException - Java RMI failure.newRealTuple(Real[], CoordinateSystem)
public RealTuple newRealTuple(Real[] values,
CoordinateSystem coordSys)
throws VisADException,
RemoteException
values - The values.coordSys - The coordinate system transformation. May be
null, in which case the default
coordinate system transformation is used.
RealTuple.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public DataImpl newValue(double[] amounts,
Unit[] units,
ErrorEstimate[] errors,
CoordinateSystem coordSys)
throws VisADException,
RemoteException
amounts - The numerical amounts.units - The units of the amounts. May be
null -- in which case the defualt
units are used; otherwise, element
i is the unit for the respective
numerical amount (and may, itself, be
null -- in which case the default
unit is used).errors - The uncertainties of the numerical amounts.
May be null, in which case the
undertainties are zero; otherwise, element
i is the uncertainty for the
respectve numerical amount (and may, itself, be
null -- in which case the
uncertainty is zero).coordSys - The coordinate system transformation. May be
null, in which case the default
coordinate system transformation is used.
RealTuple.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public boolean isCompatible(Data data)
throws VisADException,
RemoteException
MathType is compatible.
data - The VisAD data object to examine for
compatibility.
true if and only if the MathType of
the VisAD data object is compatible with this
instance.
VisADException - VisAD failure.
RemoteException - Java RMI failure.isCompatible(MathType)
public boolean isCompatible(MathType type)
throws VisADException
RealTupleType.equalsExceptNameButUnits(visad.MathType) method returns true when given
the return value of getRealTupleType() and if the coordinate
system transformations are compatible. A SetType is compatible if
its RealTupleType is compatible. A FunctionType is compatible if
the MathType of its range is compatible. All other MathTypes are
incompatible.
type - The VisAD MathType to examine for compatibility.
true if and only if the MathType is
compatible with this instance.
VisADException - VisAD failure.
public final void vet(Data data)
throws TypeException,
VisADException,
RemoteException
data - The VisAD data object to examine for
compatibility.
TypeException - The VisAD data object is incompatible with this
quantity.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public final void vet(MathType type)
throws VisADException
type - The VisAD MathType to examine for compatibility.
VisADException - if a core VisAD failure occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||