public final class ShadowedSymbolTable extends SymbolTable
SymbolTable.Entry
Modifier and Type | Field and Description |
---|---|
protected SymbolTable |
fSymbolTable
Main symbol table.
|
fBuckets, fCount, fLoadFactor, fTableSize, fThreshold, TABLE_SIZE
Constructor and Description |
---|
ShadowedSymbolTable(SymbolTable symbolTable)
Constructs a shadow of the specified symbol table.
|
Modifier and Type | Method and Description |
---|---|
String |
addSymbol(char[] buffer,
int offset,
int length)
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 |
hash(char[] buffer,
int offset,
int length)
Returns a hashcode value for the specified symbol information.
|
int |
hash(String symbol)
Returns a hashcode value for the specified symbol.
|
containsSymbol, containsSymbol, rehash
protected SymbolTable fSymbolTable
public ShadowedSymbolTable(SymbolTable symbolTable)
public String addSymbol(String symbol)
addSymbol
in class SymbolTable
symbol
- The new symbol.public String addSymbol(char[] buffer, int offset, int length)
addSymbol
in class SymbolTable
buffer
- The buffer containing the new symbol.offset
- The offset into the buffer of the new symbol.length
- The length of the new symbol in the buffer.public int hash(String symbol)
hash(char[],int,int)
method when called
with the character array that comprises the symbol string.hash
in class SymbolTable
symbol
- The symbol to hash.public int hash(char[] buffer, int offset, int length)
hash(String)
method when called
with the string object created from the symbol information.hash
in class SymbolTable
buffer
- The character buffer containing the symbol.offset
- The offset into the character buffer of the start
of the symbol.length
- The length of the symbol.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.