## visad.data.netcdf.in
Class VirtualDataIterator

    java.lang.Object
      visad.data.netcdf.in.VirtualDataIterator

Direct Known Subclasses:
  CfView.DataIterator, DefaultView.DefaultDataIterator, View.DataIterator

public abstract class VirtualDataIterator
extends Object

Supports iteration over the virtual VisAD data objects in a netCDF dataset.

Field Summary
`protected View` `view` The view of the netCDF dataset that's being iterated over.

Constructor Summary
`VirtualDataIterator(View view)` Constructs from a view of a netCDF dataset.

Method Summary
`protected abstract VirtualData` `getData()` Gets a clone of the next virtual VisAD data object.
`View` `getNetcdf()` Gets the view of the netCDF dataset.
`boolean` `hasNext()` Indicates if there's another virtual VisAD data object.
`VirtualData` `next()` Gets the next virtual VisAD data object.

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

Field Detail

### view

    protected final View view

  The view of the netCDF dataset that's being iterated over.

Constructor Detail

### VirtualDataIterator

    public VirtualDataIterator(View view)

  Constructs from a view of a netCDF dataset.

Parameters:
  `view` - A view of a netCDF dataset.

Method Detail

### hasNext

    public boolean hasNext()
                    throws VisADException,
                           IOException

  Indicates if there's another virtual VisAD data object.

  Returns:
    `true` <=> `hasNext()` will return the next virtual VisAD data object.
  Throws:
    `VisADException` - Couldn't create necessary VisAD object.
    `IOException` - I/O failure.

### next

    public VirtualData next()
                     throws BadFormException,
                            NoSuchElementException,
                            VisADException,
                            IOException

  Gets the next virtual VisAD data object. The next object will be either a VirtualScalar, a VirtualField, or a VirtualFlatField.

  Returns:
    The next virtual VisAD data object.
  Throws:
    `BadFormException` - Non-conforming netCDF dataset.
    `NoSuchElementException` - No more virtual VisAD data objects.
    `IOException` - I/O failure.
    `VisADException`

### getData

    protected abstract VirtualData getData()
                                    throws VisADException,
                                           IOException

  Gets a clone of the next virtual VisAD data object. This method must be overridden in subclasses.

  Returns:
    A clone of the next virtual VisAD data object or `null` if there is none.
  Throws:
    `VisADException` - Couldn't create necessary VisAD object.
    `IOException`

### getNetcdf

    public View getNetcdf()

  Gets the view of the netCDF dataset.