|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
weka.core.Trie.TrieNode
public static class Trie.TrieNode
Represents a node in the trie.
Field Summary | |
---|---|
static java.lang.Character |
STOP
the stop character |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
EMPTY_ENUMERATION |
Constructor Summary | |
---|---|
Trie.TrieNode(char c)
initializes the node |
|
Trie.TrieNode(java.lang.Character c)
initializes the node |
Method Summary | |
---|---|
boolean |
add(java.lang.String suffix)
adds the given string to its children (creates children if necessary) |
java.lang.Object |
clone()
creates a deep copy of itself |
boolean |
contains(java.lang.String suffix)
checks whether a suffix can be found in its children |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
Trie.TrieNode |
find(java.lang.String suffix)
returns the node with the given suffix |
java.lang.Character |
getChar()
returns the stored character |
java.lang.String |
getCommonPrefix()
returns the common prefix for all the nodes starting with this node. |
java.lang.String |
getCommonPrefix(java.lang.String startPrefix)
returns the common prefix for all the nodes starting with the node for the specified prefix. |
java.lang.String |
getRevision()
Returns the revision string. |
java.lang.String |
getString()
returns the full string up to the root |
boolean |
remove(java.lang.String suffix)
Removes a suffix from the trie. |
void |
setChar(java.lang.Character value)
sets the character this node represents |
int |
size()
returns the number of stored strings, i.e., leaves |
java.lang.String |
toString()
returns the node in a string representation |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
---|
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Character STOP
Constructor Detail |
---|
public Trie.TrieNode(char c)
c
- the value of this nodepublic Trie.TrieNode(java.lang.Character c)
c
- the value of this nodeMethod Detail |
---|
public java.lang.Character getChar()
public void setChar(java.lang.Character value)
value
- the character to storepublic boolean add(java.lang.String suffix)
suffix
- the suffix to add to its children
public boolean remove(java.lang.String suffix)
suffix
- the suffix to remove
public boolean contains(java.lang.String suffix)
suffix
- the suffix to look for
public java.lang.Object clone()
clone
in class javax.swing.tree.DefaultMutableTreeNode
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to check for equality
public Trie.TrieNode find(java.lang.String suffix)
suffix
- the suffix to look for
public java.lang.String getCommonPrefix()
public java.lang.String getCommonPrefix(java.lang.String startPrefix)
startPrefix
- the prefix of the node to start the search from
public int size()
public java.lang.String getString()
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |