public class TrieSymbolTable extends Object implements SymbolTable
Constructor and Description |
---|
TrieSymbolTable(String name,
Trie trie) |
TrieSymbolTable(String name,
Trie trie,
int columnCategory,
String nullValueStrategy) |
Modifier and Type | Method and Description |
---|---|
int |
addSymbol(String symbol) |
void |
clearTmpStorage() |
boolean |
equals(Object obj) |
Set<Integer> |
getCodes() |
SortedMap<Integer,TrieNode> |
getCodeTable() |
int |
getColumnCategory() |
String |
getName() |
int |
getNullValueCode(NullValues.NullValueId nullValueIdentifier) |
String |
getNullValueStrategy() |
String |
getNullValueSymbol(NullValues.NullValueId nullValueIdentifier) |
String |
getSymbolCodeToString(int code) |
int |
getSymbolStringToCode(String symbol) |
protected Trie |
getTrie() |
int |
getValueCounter() |
int |
hashCode() |
protected int |
increaseValueCounter() |
boolean |
isNullValue(int code) |
boolean |
isNullValue(String symbol) |
void |
load(BufferedReader in) |
String |
printSymbolTable() |
void |
save(BufferedWriter out) |
void |
saveHeader(BufferedWriter out) |
int |
size() |
String |
toString() |
protected void |
updateValueCounter(int code) |
public TrieSymbolTable(String name, Trie trie, int columnCategory, String nullValueStrategy) throws MaltChainedException
MaltChainedException
public TrieSymbolTable(String name, Trie trie)
public int addSymbol(String symbol) throws MaltChainedException
addSymbol
in interface Table
MaltChainedException
public String getSymbolCodeToString(int code) throws MaltChainedException
getSymbolCodeToString
in interface Table
MaltChainedException
public int getSymbolStringToCode(String symbol) throws MaltChainedException
getSymbolStringToCode
in interface Table
MaltChainedException
public void clearTmpStorage()
public String getNullValueStrategy()
public int getColumnCategory()
public String printSymbolTable() throws MaltChainedException
printSymbolTable
in interface SymbolTable
MaltChainedException
public void saveHeader(BufferedWriter out) throws MaltChainedException
MaltChainedException
public void save(BufferedWriter out) throws MaltChainedException
save
in interface SymbolTable
MaltChainedException
public void load(BufferedReader in) throws MaltChainedException
load
in interface SymbolTable
MaltChainedException
public int getValueCounter()
getValueCounter
in interface SymbolTable
protected void updateValueCounter(int code)
protected int increaseValueCounter()
public int getNullValueCode(NullValues.NullValueId nullValueIdentifier) throws MaltChainedException
getNullValueCode
in interface SymbolTable
MaltChainedException
public String getNullValueSymbol(NullValues.NullValueId nullValueIdentifier) throws MaltChainedException
getNullValueSymbol
in interface SymbolTable
MaltChainedException
public boolean isNullValue(String symbol) throws MaltChainedException
isNullValue
in interface SymbolTable
MaltChainedException
public boolean isNullValue(int code) throws MaltChainedException
isNullValue
in interface SymbolTable
MaltChainedException
public SortedMap<Integer,TrieNode> getCodeTable()
Copyright 2007-2014 Johan Hall, Jens Nilsson and Joakim Nivre.