public class SymbolTable extends Object
Constructor and Description |
---|
SymbolTable(int tableSize) |
Modifier and Type | Method and Description |
---|---|
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 buffer,
int offset,
int len,
int hash) |
String |
addSymbol(String buffer,
int offset,
int len,
int hash,
boolean replace) |
static int |
hash(char[] buffer,
int offset,
int len) |
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 int hash(char[] buffer, int offset, int len)
Copyright © 2012–2022 Alibaba Group. All rights reserved.