APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.utils

public Class Trie

extends Object
Class Inheritance

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
Trie.Node

The node representation for the trie.

Field Summary

Modifier and TypeField and Description
public static final int
ALPHA_SIZE

Size of the m_nextChar array.

private char[]
m_charBuffer

helper buffer to convert Strings to char arrays

pack-priv Trie.Node
m_Root

The root node of the tree.

Constructor Summary

AccessConstructor and Description
public
Trie()

Construct the trie.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The object that matches the key, or null.
get
(final String
must be a 7-bit ASCII string
key
)

Get an object that matches the key.

public Object

Returns:

The old object that matched key, or null.
put
(String
must be a 7-bit ASCII string
key
,
Object
any java object.
value
)

Put an object into the trie for lookup.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALPHA_SIZEback to summary
public static final int ALPHA_SIZE

Size of the m_nextChar array.

m_charBufferback to summary
private char[] m_charBuffer

helper buffer to convert Strings to char arrays

m_Rootback to summary
pack-priv Trie.Node m_Root

The root node of the tree.

Constructor Detail

Trieback to summary
public Trie()

Construct the trie.

Method Detail

getback to summary
public Object get(final String key)

Get an object that matches the key.

Parameters
key:String

must be a 7-bit ASCII string

Returns:Object

The object that matches the key, or null.

putback to summary
public Object put(String key, Object value)

Put an object into the trie for lookup.

Parameters
key:String

must be a 7-bit ASCII string

value:Object

any java object.

Returns:Object

The old object that matched key, or null.

com.sun.org.apache.xml.internal.utils back to summary

pack-priv Class Trie.Node

extends Object
Class Inheritance

The node representation for the trie.

Field Summary

Modifier and TypeField and Description
pack-priv Trie.Node[]
m_nextChar

The next nodes.

pack-priv Object
m_Value

The value.

Constructor Summary

AccessConstructor and Description
pack-priv
Node()

Constructor, creates a Node[ALPHA_SIZE].

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_nextCharback to summary
pack-priv Trie.Node[] m_nextChar

The next nodes.

m_Valueback to summary
pack-priv Object m_Value

The value.

Constructor Detail

Nodeback to summary
pack-priv Node()

Constructor, creates a Node[ALPHA_SIZE].