## ucar.netcdf
Interface AttributeSet

All Known Implementing Classes:
  AttributeDictionary

public interface AttributeSet

AttributeSet is an inquiry interface for a collection of Attributes. Uses naming conventions of Collection framework.

See Also:
  `Collection`, `Attribute`

Method Summary
`boolean` `contains(Object oo)` Tests if the argument is in this set.
`boolean` `contains(String name)` Tests if the Attribute identified by `name` is in this set.
`Attribute` `get(String name)` Retrieve the attribute associated with the specified name.
`AttributeIterator` `iterator()` Returns AttributeIterator for the elements.
`Attribute` `put(Attribute attr)` Ensures that this set contains the specified Attribute.
`boolean` `remove(Object oo)` Delete the Attribute specified from this set.
`boolean` `remove(String name)` Delete the Attribute specified by name from this set.
`int` `size()` Returns the number of elements in the set
`Attribute[]` `toArray()` Returns a new Array containing the elements of this set.

Method Detail

### size

    public int size()

  Returns the number of elements in the set

  Returns:
    int number of elements in the set

### iterator

    public AttributeIterator iterator()

  Returns AttributeIterator for the elements.

  Returns:
    AttributeIterator for the elements.
  See Also:
    `AttributeIterator`

### toArray

    public Attribute[] toArray()

  Returns a new Array containing the elements of this set.

  Returns:
    a new Array containing the elements of this set.

### get

    public Attribute get(String name)

  Retrieve the attribute associated with the specified name.

  Parameters:
    `name` - String which identifies the desired attribute
  Returns:
    the attribute, or null if not found

### contains

    public boolean contains(String name)

  Tests if the Attribute identified by `name` is in this set.

  Parameters:
    `name` - String which identifies the desired attribute
  Returns:
    `true` if and only if this set contains the named Attribute.

### contains

    public boolean contains(Object oo)

  Tests if the argument is in this set.

  Parameters:
    `oo` - some Object
  Returns:
    `true` if and only if this set contains `oo`

### put

    public Attribute put(Attribute attr)

  Ensures that this set contains the specified Attribute. If a different Attribute with the same name, was in the set, it is returned, otherwise null is returned.

  This is an "optional operation" in the sense of the Collections framework. In the context of this package, this method will throw UnsupportedOperationException when the set is unmodifiable. This will be the case when this AttributeSet is associated with a Netcdf or a Variable. The AttributeSet will be modifiable when it is associated with a Schema or ProtoVariable.

  Parameters:
    `attr` - the Attribute to be added to this set.
  Returns:
    Attribute replaced or null if not a replacement

### remove

    public boolean remove(String name)

  Delete the Attribute specified by name from this set.

  This is an "optional operation" in the sense of the Collections framework. In the context of this package, this method will throw UnsupportedOperationException when the set is unmodifiable. This will be the case when this AttributeSet is associated with a Netcdf or a Variable. The AttributeSet will be modifiable when it is associated with a Schema or ProtoVariable.

  Parameters:
    `name` - String identifying the Attribute to be removed.
  Returns:
    true if the Set changed as a result of this call.

### remove

    public boolean remove(Object oo)

  Delete the Attribute specified from this set.

  This is an "optional operation" in the sense of the Collections framework. In the context of this package, this method will throw UnsupportedOperationException when the Set is unmodifiable.s This will be the case when this AttributeSet is associated with a Netcdf or a Variable. The AttributeSet will be modifiable when it is associated with a Schema or ProtoVariable.

  Parameters:
    `oo` - Attribute to be removed.
  Returns:
    true if the Set changed as a result of this call.