TrieNode (MaltParser 1.4.1)
Date: 2010-07-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.maltparser.core.symbol.trie
Class TrieNode

    java.lang.Object
      org.maltparser.core.symbol.trie.TrieNode

    public class TrieNode

extends Object

Since:
  1.0
Author:
  Johan Hall

Constructor Summary
`TrieNode(char character, TrieNode parent)` Constructs a trie node

Method Summary
`boolean` | `equals(Object obj)`
`char` | `getCharacter()` Returns the character of the trie node
`TrieNode` | `getChild(char c)` Returns the child node that corresponds to the character
`TrieEntry` | `getEntry(TrieSymbolTable table)` Returns the entry of the symbol table 'table'
`TrieNode` | `getOrAddChild(boolean isWord, char c, TrieSymbolTable table, int code)` Adds and/or retrieve a child trie node.
`TrieNode` | `getParent()` Returns the parent node
`int` | `hashCode()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TrieNode

    public TrieNode(char character,
                    TrieNode parent)

  Constructs a trie node

  Parameters:
    `character` - which character that the trie node belongs to
    `parent` - the parent trie node

Method Detail

### getOrAddChild

    public TrieNode getOrAddChild(boolean isWord,
                                  char c,
                                  TrieSymbolTable table,
                                  int code)
                           throws SymbolException

  Adds and/or retrieve a child trie node. It only adds a entry if the parameter isWord is true.

  Parameters:
    `isWord` - true if it is a word (entry), otherwise false
    `c` - the character to the child node
    `table` - which symbol table to look in or add to
    `code` - the integer representation of the string value
  Returns:
    the child trie node that corresponds to the character
  Throws:
    `SymbolException`

### getChild

    public TrieNode getChild(char c)

  Returns the child node that corresponds to the character

  Parameters:
    `c` - the character of the child node
  Returns:
    the child node

### getEntry

    public TrieEntry getEntry(TrieSymbolTable table)

  Returns the entry of the symbol table 'table'

  Parameters:
    `table` - which symbol table
  Returns:
    the entry of the symbol table 'table'

### getCharacter

    public char getCharacter()

  Returns the character of the trie node

  Returns:
    the character of the trie node

### getParent

    public TrieNode getParent()

  Returns the parent node

  Returns:
    the parent node

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MaltParser 1.4.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2007-2010 Johan Hall, Jens Nilsson and Joakim Nivre.