lexx.trie
Class RootNode

java.lang.Object
  |
  +--lexx.trie.TrieNode
        |
        +--lexx.trie.RootNode
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, Trie

public final class RootNode
extends TrieNode
implements java.io.Serializable, java.lang.Cloneable

Create a Trie data structure

The purpose of this class is to produce a tree like structure for accessing text quickly

Copyright (c) 2002-2003

Since:
18/02/2003
Version:
1.0
Author:
Mohammed Imran
See Also:
Serialized Form

Field Summary
 
Fields inherited from class lexx.trie.TrieNode
childNodes, letter, level, obj
 
Constructor Summary
protected RootNode()
           
  RootNode(java.lang.String toStringText)
           
 
Method Summary
 void add(java.lang.String key, java.lang.Object obj, boolean isMutable)
           
static boolean canHaveDuplicates()
           
 java.lang.Object clone()
           
 java.lang.Object cloneToDisk(java.lang.String dir, int maxLevel)
           
 Trie getNode(java.lang.String key)
          Returns a specific sub-tree
static void setDuplicates(boolean canHave)
           
 java.lang.String toString()
           
 
Methods inherited from class lexx.trie.TrieNode
add, clearMutableObjectList, getAllNodes, getCurrentObjects, getObject, isLeaf, isSingleLeaf
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RootNode

protected RootNode()

RootNode

public RootNode(java.lang.String toStringText)
Method Detail

canHaveDuplicates

public static boolean canHaveDuplicates()

setDuplicates

public static void setDuplicates(boolean canHave)

cloneToDisk

public final java.lang.Object cloneToDisk(java.lang.String dir,
                                          int maxLevel)
Overrides:
cloneToDisk in class TrieNode

add

public final void add(java.lang.String key,
                      java.lang.Object obj,
                      boolean isMutable)

clone

public final java.lang.Object clone()
Specified by:
clone in interface Trie
Overrides:
clone in class TrieNode

getNode

public final Trie getNode(java.lang.String key)
Description copied from class: TrieNode
Returns a specific sub-tree

Specified by:
getNode in interface Trie
Overrides:
getNode in class TrieNode
Parameters:
key - sub-tree that has that specific key value
Returns:
Returns a specific sub-tree

toString

public java.lang.String toString()
Overrides:
toString in class TrieNode