|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.netcdf.NamedDictionary
NamedDictionary is a collection of Named things. This is used in the implementation of the other netcdf collections. Note: no public methods, all are package scope or more private.
It turns out that people think that the order of these things is important. So, we implement as a Vector, with an aux Hashtable for lookup by name.
For serialization, we only put the Vector part over the wire. The Hashtable is reconstructed at the other end. In fact, we encode the vector as an array for transport, saving a few more bytes.
| Constructor Summary | |
(package private) |
NamedDictionary(int size)
|
(package private) |
NamedDictionary(int size,
Enumeration ee)
|
(package private) |
NamedDictionary(Named[] na)
|
| Method Summary | |
(package private) boolean |
contains(Object oo)
Tests if the argument is in this set. |
(package private) boolean |
contains(String name)
Tests if the Named identified by name
is in this set. |
(package private) Enumeration |
elements()
Returns an enumeration of the elements. |
(package private) Named |
get(String name)
Gets the object associated with the specified name. |
(package private) int |
indexOf(Named elem)
Searches for the specified object, starting from the first position and returns an index to it. |
(package private) Named |
put(Named value)
Puts the specified element into the Dictionary, using the its name as key. |
(package private) Named |
remove(String name)
Removes the element corresponding to the key. |
(package private) int |
size()
Returns the number of elements contained within the Dictionary. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
NamedDictionary(Named[] na)
NamedDictionary(int size,
Enumeration ee)
NamedDictionary(int size)
| Method Detail |
int size()
Enumeration elements()
EnumerationNamed get(String name)
name - the name of the dimension
put(ucar.netcdf.Named)Named put(Named value)
value - the specified element
NullPointerException - If the value of the specified
element is null.get(java.lang.String)Named remove(String name)
name - the name of the Named that needs to be removed
int indexOf(Named elem)
elem - the desired element
boolean contains(String name)
name
is in this set.
name - String which identifies the desired object
true if and only if this set contains
the Namedboolean contains(Object oo)
oo - some Object
true if and only if this set contains
oo
TODO? typecheck?
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||