visad.data.netcdf.in
Class VirtualTuple
- java.lang.Object
-
- visad.data.netcdf.in.VirtualData
-
- visad.data.netcdf.in.VirtualTuple
-
public class VirtualTuple extends VirtualData
Provides support for a virtual VisAD Tuple. Instances are mutable.
-
-
Constructor Summary
Constructors Constructor and Description VirtualTuple()Constructs from nothing.VirtualTuple(VirtualData data)Constructs from a virtual data object.VirtualTuple(VirtualData[] datas)Constructs from a 1-D array of virtual data objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(VirtualData data)Adds a component to this tuple.voidclear()Clears this instance.java.lang.Objectclone()Clones this instance.VirtualDataget(int index)Gets a component of this tuple.DataImplgetData(Context context)Gets the VisAD data object of this tuple, in context.DataFactorygetDataFactory()Returns the factory used to create VisAD data objects.MathTypegetType()Gets the VisAD MathType of this virtual tuple.voidreplace(int index, VirtualData data)Replaces a component of this tuple.voidsetDataFactory(DataFactory factory)Sets the factory used to create the VisAD data object corresponding to this tuple and contained elements.intsize()Returns the number of components in this tuple.-
Methods inherited from class visad.data.netcdf.in.VirtualData
getData, toString
-
-
-
-
Constructor Detail
-
VirtualTuple
public VirtualTuple()
Constructs from nothing.
-
VirtualTuple
public VirtualTuple(VirtualData data)
Constructs from a virtual data object.- Parameters:
data- A virtual data object.
-
VirtualTuple
public VirtualTuple(VirtualData[] datas)
Constructs from a 1-D array of virtual data objects. Order is preserved.- Parameters:
datas- A 1-D array of virtual data objects.
-
-
Method Detail
-
size
public int size()
Returns the number of components in this tuple.- Returns:
- The number of components in this tuple.
-
add
public void add(VirtualData data)
Adds a component to this tuple.- Parameters:
data- The component to be added.
-
getType
public MathType getType() throws VisADException
Gets the VisAD MathType of this virtual tuple.- Specified by:
getTypein classVirtualData- Returns:
- The VisAD MathType of the merged data
items or
nullif no data items. - Throws:
VisADException- VisAD failure.
-
get
public VirtualData get(int index) throws java.lang.ArrayIndexOutOfBoundsException
Gets a component of this tuple.- Parameters:
index- The index of the component to get.- Returns:
- The
index-th component. - Throws:
java.lang.ArrayIndexOutOfBoundsException
-
replace
public void replace(int index, VirtualData data) throws java.lang.ArrayIndexOutOfBoundsExceptionReplaces a component of this tuple.- Parameters:
index- The index of the component to replace.data- The new component.- Throws:
java.lang.ArrayIndexOutOfBoundsException
-
getData
public DataImpl getData(Context context) throws VisADException, java.rmi.RemoteException, java.io.IOException
Gets the VisAD data object of this tuple, in context.- Specified by:
getDatain classVirtualData- Parameters:
context- The context for retrieving the data object.- Returns:
- The VisAD data object or
nullif there is no data. - Throws:
VisADException- Couldn't create necessary VisAD object.java.rmi.RemoteException- Remote access failure.java.io.IOException- I/0 failure.
-
clear
public void clear()
Clears this instance.
-
clone
public java.lang.Object clone()
Clones this instance.- Specified by:
clonein classVirtualData- Returns:
- A (deep) clone of this instance.
-
setDataFactory
public void setDataFactory(DataFactory factory)
Sets the factory used to create the VisAD data object corresponding to this tuple and contained elements.- Specified by:
setDataFactoryin classVirtualData- Parameters:
factory- The factory for creating VisAD data objects.
-
getDataFactory
public DataFactory getDataFactory()
Returns the factory used to create VisAD data objects.- Specified by:
getDataFactoryin classVirtualData- Returns:
- factory The factory for creating VisAD data objects.
-
-
DMelt 3.0 © DataMelt by jWork.ORG