edu.iastate.jtm.dic
Class LowerTrieNode
java.lang.Object
edu.iastate.jtm.dic.AbstractTrieNode
edu.iastate.jtm.dic.LowerTrieNode
- All Implemented Interfaces:
- TrieNode
public class LowerTrieNode
- extends AbstractTrieNode
Lower case letter TrieNode. (No space.)
In order to speed up performance, no character validation is performed.
If characters out of the alphabet are passed as key or search string,
OutOfArrayBoundaryExceptions are guarenteed.
- Author:
- Jing Ding
| Methods inherited from class edu.iastate.jtm.dic.AbstractTrieNode |
compareKey, createChild, getChildren, getIndex, getIndex, getKey, getKeyString, getParent, getValue, printIndexMapping, removeChild, removeChildren, setKey, setParent, setValue, supportedCharacters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LowerTrieNode
public LowerTrieNode()
createNodeInstance
protected TrieNode createNodeInstance()
- Create a new child node at the specified array index.
- Specified by:
createNodeInstance in class AbstractTrieNode
- Parameters:
id - the position in the array for the child node.
- Returns:
- The newly created child node.
createChildren
public TrieNode[] createChildren()
- Allocate memory for a node's child node array.
- Specified by:
createChildren in interface TrieNode- Specified by:
createChildren in class AbstractTrieNode
- Returns:
- Newly allocated array.
getDegree
public int getDegree()
- Return the degree of this trie (size of the trie's alphabet).
- Specified by:
getDegree in interface TrieNode- Specified by:
getDegree in class AbstractTrieNode
- Returns:
- the size of alphabet (26).
getIndex
public int getIndex(char c)
- Return the index of a character in this node's child array.
- Specified by:
getIndex in interface TrieNode- Specified by:
getIndex in class AbstractTrieNode
- Parameters:
c - the character of interest.
- Returns:
- index of the character.
isCaseSensitive
public boolean isCaseSensitive()
- Specified by:
isCaseSensitive in interface TrieNode- Overrides:
isCaseSensitive in class AbstractTrieNode