visad.data.netcdf.in
Class VirtualReal

java.lang.Object
  extended by visad.data.netcdf.in.VirtualData
      extended by visad.data.netcdf.in.VirtualScalar
          extended by visad.data.netcdf.in.VirtualReal

public class VirtualReal
extends VirtualScalar

Provides support for a virtual VisAD Real.


Constructor Summary
VirtualReal(RealType type, ucar.netcdf.Variable var, SimpleSet rangeSet, Unit unit, visad.data.netcdf.in.Vetter vetter)
          Constructs from a scalar type, a 1-D netCDF variable, a range set, a unit, and a value vetter.
 
Method Summary
 Object clone()
          Clones this instance.
 double[] getDoubles(Context context)
          Gets the double values corresponding to this virtual, data object at a given context.
 SimpleSet getRangeSet()
          Gets the range set of this scalar.
protected  Scalar getScalar(Context context)
          Gets the Scalar object corresponding to this virtual, data object.
 Unit getUnit()
          Gets the unit of the value.
 visad.data.netcdf.in.Vetter getVetter()
          Gets the value vetter.
 boolean isReal()
          Determines if this is a VirtualReal or not.
 
Methods inherited from class visad.data.netcdf.in.VirtualScalar
getData, getDataFactory, getScalarType, getType, getVariable, setDataFactory
 
Methods inherited from class visad.data.netcdf.in.VirtualData
getData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VirtualReal

public VirtualReal(RealType type,
                   ucar.netcdf.Variable var,
                   SimpleSet rangeSet,
                   Unit unit,
                   visad.data.netcdf.in.Vetter vetter)
Constructs from a scalar type, a 1-D netCDF variable, a range set, a unit, and a value vetter.

Parameters:
type - The type of the nested scalar.
var - The 1-D netCDF variable.
rangeSet - The range set of the values.
unit - The unit of the values.
vetter - The value vetter.
Method Detail

getRangeSet

public SimpleSet getRangeSet()
Gets the range set of this scalar.

Overrides:
getRangeSet in class VirtualScalar
Returns:
The range set of this scalar.

getUnit

public Unit getUnit()
Gets the unit of the value.

Overrides:
getUnit in class VirtualScalar
Returns:
The unit of the value.

getVetter

public visad.data.netcdf.in.Vetter getVetter()
Gets the value vetter.

Overrides:
getVetter in class VirtualScalar
Returns:
The value vetter.

getScalar

protected Scalar getScalar(Context context)
                    throws VisADException,
                           InvalidContextException,
                           IOException
Gets the Scalar object corresponding to this virtual, data object.

Specified by:
getScalar in class VirtualScalar
Returns:
The VisAD Scalar corresponding to this virtual, data object.
Throws:
InvalidContextException - if the indicial context is invalid.
VisADException - Couldn't create necessary VisAD object.
RemoteException - if a Java RMI failure occurs.
IOException - I/O failure.

getDoubles

public double[] getDoubles(Context context)
                    throws IOException,
                           VisADException
Gets the double values corresponding to this virtual, data object at a given context.

Overrides:
getDoubles in class VirtualScalar
Returns:
The double values of this virtual, data object. throws VisADException Couldn't create necessary VisAD object. throws IOException I/O failure.
Throws:
IOException - I/O failure.
VisADException - Couldn't create necessary VisAD object.

isReal

public boolean isReal()
Determines if this is a VirtualReal or not.

Overrides:
isReal in class VirtualScalar
Returns:
true if this is a VirtualReal

clone

public Object clone()
Clones this instance.

Specified by:
clone in class VirtualData
Returns:
A (deep) clone of this instance.