org.apache.xml.utils
Class Trie

java.lang.Object
  |
  +--org.apache.xml.utils.Trie

public class Trie
extends java.lang.Object

**For internal use only** A digital search trie for 7-bit ASCII text The API is a subset of java.util.Hashtable The key must be a 7-bit ASCII string The value may be any Java Object


Field Summary
static int ALPHA_SIZE
          Size of the m_nextChar array.
 
Constructor Summary
Trie()
          Construct the trie.
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Get an object that matches the key.
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          Put an object into the trie for lookup.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALPHA_SIZE

public static final int ALPHA_SIZE
Size of the m_nextChar array.
Constructor Detail

Trie

public Trie()
Construct the trie.
Method Detail

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Put an object into the trie for lookup.
Parameters:
key - must be a 7-bit ASCII string
value - any java object.
Returns:
The old object that matched key, or null.

get

public java.lang.Object get(java.lang.String key)
Get an object that matches the key.
Parameters:
key - must be a 7-bit ASCII string
Returns:
The object that matches the key, or null.


Copyright © 2003 Apache XML Project. All Rights Reserved.