ucar.unidata.view.sounding
Class SelectorCell
java.lang.Object
ucar.unidata.view.sounding.ComputeCell
ucar.unidata.view.sounding.SelectorCell
public final class SelectorCell
- extends ComputeCell
Creates an output Data object from an array of input
Data objects.
- Version:
- $Revision: 1.7 $ $Date: 2005/05/13 18:33:37 $
- Author:
- Steven R. Emmerson
|
Constructor Summary |
SelectorCell(DataReference indexRef,
DataReference[] refs,
Data noData)
Constructs from a reference to a selector index, an array of
references to the individual data objects, and a missing output data
value. |
SelectorCell
public SelectorCell(DataReference indexRef,
DataReference[] refs,
Data noData)
throws VisADException,
RemoteException
- Constructs from a reference to a selector index, an array of
references to the individual data objects, and a missing output data
value.
- Parameters:
indexRef - The selector index reference.refs - The input data references.noData - The missing-data value.
- Throws:
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
IllegalArgumentException - if refs.length == 0.
compute
protected Data compute(Data[] datums)
throws VisADException,
RemoteException
- Computes (selects) the output
Data.
- Specified by:
compute in class ComputeCell
- Parameters:
datums - The data objects. datums[0] is
the (origin zero) selector index and must
be a Real. datums[1+i]
is the data object corresponding to the
ith DataReference of
the array used during construction.
- Returns:
- The input datum corresponding to the
selector index.
- Throws:
ArrayIndexOutOfBoundsException - if ((Real)datums[0]).getValue()
is less than zero or greater than
datums.length-2.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.