|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alibaba.druid.sql.parser.SymbolTable
public class SymbolTable
| Field Summary | |
|---|---|
static int |
DEFAULT_TABLE_SIZE
Default table size. |
static int |
MAX_SIZE
|
| Constructor Summary | |
|---|---|
SymbolTable()
Constructs a symbol table with a default number of buckets. |
|
SymbolTable(int tableSize)
Constructs a symbol table with a specified number of buckets. |
|
| Method Summary | |
|---|---|
String |
addSymbol(char[] buffer,
int offset,
int len)
|
String |
addSymbol(char[] buffer,
int offset,
int len,
int hash)
Adds the specified symbol to the symbol table and returns a reference to the unique symbol. |
String |
addSymbol(String symbol)
Adds the specified symbol to the symbol table and returns a reference to the unique symbol. |
int |
getIndexMask()
|
static int |
hash(char[] buffer,
int offset,
int len)
|
static int |
hash(String symbol)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_TABLE_SIZE
public static final int MAX_SIZE
| Constructor Detail |
|---|
public SymbolTable()
public SymbolTable(int tableSize)
| Method Detail |
|---|
public String addSymbol(String symbol)
symbol - The new symbol.public int getIndexMask()
public String addSymbol(char[] buffer,
int offset,
int len)
public String addSymbol(char[] buffer,
int offset,
int len,
int hash)
buffer - The buffer containing the new symbol.offset - The offset into the buffer of the new symbol.len - The length of the new symbol in the buffer.public static final int hash(String symbol)
public static final int hash(char[] buffer,
int offset,
int len)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||