## ucar.netcdf
Class NetcdfWrapper

    java.lang.Object
      ucar.netcdf.NetcdfWrapper

All Implemented Interfaces:
  Netcdf

Direct Known Subclasses:
  VariableFilter

public abstract class NetcdfWrapper
extends Object
implements Netcdf

Abstract "decorator" class for wrapping a `Netcdf` object. All method invocations of the `Netcdf` API are forwarded to a contained `Netcdf` object. This class is designed to be extended.

Constructor Summary
`protected` `NetcdfWrapper(Netcdf netcdf)` Constructs from a netCDF object.

Method Summary
`boolean` `contains(Object oo)` Tests an object is in this dataset.
`boolean` `contains(String name)` Tests if the Variable identified by `name` is in this dataset.
`Variable` `get(String name)` Retrieve the variable associated with a name.
`Attribute` `getAttribute(String name)` Returns a global, netCDF attribute by name.
`AttributeSet` `getAttributes()` Returns the set of global, netCDF attributes in this dataset.
`DimensionSet` `getDimensions()` Returns all the netCDF dimensions in this dataset.
`Netcdf` `getNetcdf()` Returns the wrapped `Netcdf` object.
`VariableIterator` `iterator()` Returns an iterator over the variables.
`int` `size()` Returns the number of variables.

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

Constructor Detail

### NetcdfWrapper

    protected NetcdfWrapper(Netcdf netcdf)
                     throws NullPointerException

  Constructs from a netCDF object.

Parameters:
  `netcdf` - The netCDF dataset to be wrapped.

Method Detail

### getNetcdf

    public final Netcdf getNetcdf()

  Returns the wrapped `Netcdf` object.

  Returns:
    The wrapped, `Netcdf` object.

### size

    public int size()

  Returns the number of variables.

  Specified by:
    `size` in interface `Netcdf`
  Returns:
    The number of variables

### iterator

    public VariableIterator iterator()

  Returns an iterator over the variables.

  Specified by:
    `iterator` in interface `Netcdf`
  Returns:
    An iterator over the variables.
  See Also:
    `VariableIterator`

### get

    public Variable get(String name)

  Retrieve the variable associated with a name. If no such variable exists, then `null` is returned.

  Specified by:
    `get` in interface `Netcdf`
  Parameters:
    `name` - Name of the desired variable.
  Returns:
    The variable or `null`.

### contains

    public boolean contains(String name)

  Tests if the Variable identified by `name` is in this dataset.

  Specified by:
    `contains` in interface `Netcdf`
  Parameters:
    `name` - Name of the desired variable.
  Returns:
    `true` if and only if this dataset contains the named variable.

### contains

    public boolean contains(Object oo)

  Tests an object is in this dataset.

  Specified by:
    `contains` in interface `Netcdf`
  Parameters:
    `oo` - An object.
  Returns:
    `true` if and only if this dataset contains `oo`.

### getDimensions

    public DimensionSet getDimensions()

  Returns all the netCDF dimensions in this dataset.

  Specified by:
    `getDimensions` in interface `Netcdf`
  Returns:
    The union of all dimensions of all variables. May be empty.

### getAttributes

    public AttributeSet getAttributes()

  Returns the set of global, netCDF attributes in this dataset.

  Specified by:
    `getAttributes` in interface `Netcdf`
  Returns:
    All global attributes in this dataset. May be empty.

### getAttribute

    public Attribute getAttribute(String name)

  Returns a global, netCDF attribute by name. If no such attribute exists, then `null` is returned.

  Specified by:
    `getAttribute` in interface `Netcdf`
  Parameters:
    `name` - the name of the attribute
  Returns:
    The attribute or `null`.