## visad.data.netcdf.out
Class IndependentVar

    java.lang.Object
      ucar.netcdf.ProtoVariable
          visad.data.netcdf.out.ExportVar
              visad.data.netcdf.out.IndependentVar

All Implemented Interfaces:
  Accessor, Cloneable, MultiArrayInfo, Named, Serializable

class IndependentVar
extends ExportVar

Constructor Summary
`protected` `IndependentVar(String name, Dimension dim, Unit unit, SampledSet set, int idim)` Construct from broken-out information.

Method Summary
`void` `copyin(int[] origin, MultiArray multiArray)` Set an array element identified by position.
`MultiArray` `copyout(int[] origin, int[] shape)` Return a MultiArray into a slice of the data.
`Object` `get(int[] indexes)` Return an array element identified by position.
`boolean` `getBoolean(int[] indexes)` Return an array element identified by position.
`byte` `getByte(int[] indexes)` Return an array element identified by position.
`char` `getChar(int[] indexes)` Return an array element identified by position.
`double` `getDouble(int[] indexes)` Return an array element identified by position.
`float` `getFloat(int[] indexes)` Return an array element identified by position.
`int` `getInt(int[] indexes)` Return an array element identified by position.
`long` `getLong(int[] indexes)` Return an array element identified by position.
`short` `getShort(int[] indexes)` Return an array element identified by position.
`protected static Attribute[]` `myAttributes(Unit unit)` Return my attributes for construction.
`void` `set(int[] index, Object value)` Set an array element identified by position.
`void` `setBoolean(int[] index, boolean value)` Set an array element identified by position.
`void` `setByte(int[] index, byte value)` Set an array element identified by position.
`void` `setChar(int[] index, char value)` Set an array element identified by position.
`void` `setDouble(int[] index, double value)` Set an array element identified by position.
`void` `setFloat(int[] index, float value)` Set an array element identified by position.
`void` `setInt(int[] index, int value)` Set an array element identified by position.
`void` `setLong(int[] index, long value)` Set an array element identified by position.
`void` `setShort(int[] index, short value)` Set an array element identified by position.
`Object` `toArray()` Convert values to an array.
`Object` `toArray(Object obj, int[] dummy1, int[] dummy2)` Convert values to an array.

Methods inherited from class ucar.netcdf.ProtoVariable
`clone, getAttribute, getAttributes, getComponentType, getDimensionIterator, getLengths, getName, getRank, isScalar, isUnlimited, putAttribute, toCdl, toString`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### IndependentVar

    protected IndependentVar(String name,
                             Dimension dim,
                             Unit unit,
                             SampledSet set,
                             int idim)
                      throws BadFormException

  Construct from broken-out information.

Parameters:
  `name` - The name for the netCDF variable.
  `dim` - The netCDF dimension for the independent variable.
  `unit` - The unit of the netCDF variable (may be `null`).
  `set` - The VisAD SampledSet that "contains" the independent variable.
  `idim` - The component index within the SampledSet associated with the independent variable.
Throws:
  `BadFormException` - The netCDF variable cannot be represented.

Method Detail

### myAttributes

    protected static Attribute[] myAttributes(Unit unit)

  Return my attributes for construction.

  Parameters:
    `unit` - The unit of the netCDF variable (may be `null`).
  Returns:
    The attributes for the netCDF variable.

### get

    public Object get(int[] indexes)
               throws IOException

  Return an array element identified by position.

  Specified by:
    `get` in interface `Accessor`
  Specified by:
    `get` in class `ExportVar`
  Parameters:
    `indexes` - The netCDF indexes of the array element.
  Returns:
    The array element at the given position.
  Throws:
    `IOException` - Data access I/O failure.

### copyin

    public void copyin(int[] origin,
                       MultiArray multiArray)
                throws IOException

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `copyin` in interface `Accessor`
  Parameters:
    `origin` - int array specifying the starting index.
    `multiArray` - MultiArray with the same componentType as this and shape smaller than `this.getLengths() - origin`
  Throws:
    `IOException`

### set

    public void set(int[] index,
                    Object value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `set` in interface `Accessor`
  Parameters:
    `index` - MultiArray index
    `value` - the new value.

### setBoolean

    public void setBoolean(int[] index,
                           boolean value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setBoolean` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setChar

    public void setChar(int[] index,
                        char value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setChar` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setByte

    public void setByte(int[] index,
                        byte value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setByte` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setShort

    public void setShort(int[] index,
                         short value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setShort` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setInt

    public void setInt(int[] index,
                       int value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setInt` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setLong

    public void setLong(int[] index,
                        long value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setLong` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setFloat

    public void setFloat(int[] index,
                         float value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setFloat` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### setDouble

    public void setDouble(int[] index,
                          double value)

  Set an array element identified by position. Not supported for read-only, VisAD data objects.

  Specified by:
    `setDouble` in interface `Accessor`
  See Also:
    `Accessor.set(int[], java.lang.Object)`

### getBoolean

    public boolean getBoolean(int[] indexes)
                       throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getBoolean` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getChar

    public char getChar(int[] indexes)
                 throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getChar` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getByte

    public byte getByte(int[] indexes)
                 throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getByte` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getShort

    public short getShort(int[] indexes)
                   throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getShort` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getInt

    public int getInt(int[] indexes)
               throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getInt` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getLong

    public long getLong(int[] indexes)
                 throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getLong` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getFloat

    public float getFloat(int[] indexes)
                   throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getFloat` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### getDouble

    public double getDouble(int[] indexes)
                     throws IOException

  Return an array element identified by position. Not supported.

  Specified by:
    `getDouble` in interface `Accessor`
  Throws:
    `IOException`
  See Also:
    `Accessor.get(int[])`

### copyout

    public MultiArray copyout(int[] origin,
                              int[] shape)
                       throws IOException

  Return a MultiArray into a slice of the data. Not supported.

  Specified by:
    `copyout` in interface `Accessor`
  Parameters:
    `origin` - int array specifying the starting index.
    `shape` - int array specifying the extents in each dimension. This becomes the shape of the return.
  Returns:
    the MultiArray with the specified shape
  Throws:
    `IOException`

### toArray

    public Object toArray()

  Convert values to an array. Not supported.

  Specified by:
    `toArray` in interface `Accessor`
  Returns:
    a one dimensional Array containing all the elements in this MultiArray

### toArray

    public Object toArray(Object obj,
                          int[] dummy1,
                          int[] dummy2)

  Convert values to an array. Not supported.

  Specified by:
    `toArray` in interface `Accessor`
  Returns:
    a one dimensional Array containing the specified elements