|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.netcdf.AttributeDictionary
AttributeDictionary is the machinery to implement AttributeSet. It wraps NamedDictionary so that the NamedDictionary can only contain Attributes. Note that AttributeDictionary is mutable, it has methods for adding new elements and removing elements. These methods should be exposed in the ProtoVariable and Schema implementations, and _not_ exposed in the Variable and Netcdf implementations.
Note: no public constructor.
AttributeSet| Field Summary | |
protected NamedDictionary |
attributes
|
| Constructor Summary | |
(package private) |
AttributeDictionary()
|
(package private) |
AttributeDictionary(Attribute[] attrArray)
|
(package private) |
AttributeDictionary(AttributeSet ss)
|
| 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)
Gets the attribute associated with the specified name. |
AttributeIterator |
iterator()
Returns an iterator 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 contained within the Dictionary. |
Attribute[] |
toArray()
Returns a new Array containing the elements of this set. |
void |
toCdl(StringBuffer buf)
Format as CDL. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final NamedDictionary attributes
| Constructor Detail |
AttributeDictionary()
AttributeDictionary(Attribute[] attrArray)
AttributeDictionary(AttributeSet ss)
| Method Detail |
public int size()
size in interface AttributeSetpublic AttributeIterator iterator()
iterator in interface AttributeSetIteratorpublic Attribute[] toArray()
AttributeSet
toArray in interface AttributeSetpublic Attribute get(String name)
get in interface AttributeSetname - the name of the attribute
public boolean contains(String name)
name
is in this set.
contains in interface AttributeSetname - String which identifies the desired attribute
true if and only if this set contains
the named Attribute.public boolean contains(Object oo)
contains in interface AttributeSetoo - some Object
true if and only if this set contains
oopublic Attribute put(Attribute attr)
put in interface AttributeSetattr - the Attribute to be added to this set.
public boolean remove(String name)
remove in interface AttributeSetname - String identifying the Attribute to be removed.
public boolean remove(Object oo)
remove in interface AttributeSetoo - Attribute to be removed.
public void toCdl(StringBuffer buf)
buf - StringBuffer into which to writepublic String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||