org.enhydra.apache.xerces.validators.common
Class XMLValidator.OrderedHashtable

java.lang.Object
  |
  +--org.enhydra.apache.xerces.validators.common.XMLValidator.OrderedHashtable
All Implemented Interfaces:
Cloneable
Enclosing class:
XMLValidator

static final class XMLValidator.OrderedHashtable
extends Object
implements Cloneable

Ordered hashtable. This class acts as a hashtable with put() and get() operations but also allows values to be queried via the order that they were added to the hashtable.

Note: This class does not perform any error checking.

Note: This class is not efficient but is assumed to be used for a very small set of values.

Author:
Andy Clark, IBM

Inner Class Summary
static class XMLValidator.OrderedHashtable.Entry
          Hashtable entry.
 
Constructor Summary
(package private) XMLValidator.OrderedHashtable()
           
 
Method Summary
 void clear()
          Removes all of the entries from the hashtable.
 Object clone()
          Clones this object.
 IDValue get(Field key)
          Returns the value associated to the specified key.
 int indexOf(Field key)
          Returns the index of the entry with the specified key.
 Field keyAt(int index)
          Returns the key at the specified index.
 void put(Field key, IDValue value)
          Puts an entry into the hashtable.
 int size()
          Returns the number of entries in the hashtable.
 String toString()
          Returns a string representation of this object.
 IDValue valueAt(int index)
          Returns the value at the specified index.
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLValidator.OrderedHashtable

XMLValidator.OrderedHashtable()
Method Detail

size

public int size()
Returns the number of entries in the hashtable.

put

public void put(Field key,
                IDValue value)
Puts an entry into the hashtable.

get

public IDValue get(Field key)
Returns the value associated to the specified key.

indexOf

public int indexOf(Field key)
Returns the index of the entry with the specified key.

keyAt

public Field keyAt(int index)
Returns the key at the specified index.

valueAt

public IDValue valueAt(int index)
Returns the value at the specified index.

clear

public void clear()
Removes all of the entries from the hashtable.

clone

public Object clone()
Clones this object.
Overrides:
clone in class Object

toString

public String toString()
Returns a string representation of this object.
Overrides:
toString in class Object


Copyright © 1999 The Apache Software Foundation. All Rights reserved.