Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.util

public final Class ShadowedSymbolTable

extends SymbolTable
Class Inheritance

Shadowed symbol table. The table has a reference to the main symbol table and is not allowed to add new symbols to the main symbol table. New symbols are added to the shadow symbol table and are local to the component using this table.
Author
Andy Clark IBM

Field Summary

Modifier and TypeField and Description
protected SymbolTable
fSymbolTable

Main symbol table.

Inherited from com.sun.org.apache.xerces.internal.util.SymbolTable:
fBucketsfCollisionThresholdfCountfHashMultipliersfLoadFactorfTableSizefThresholdMAX_HASH_COLLISIONSMULTIPLIERS_MASKMULTIPLIERS_SIZETABLE_SIZE

Constructor Summary

AccessConstructor and Description
public
ShadowedSymbolTable(SymbolTable symbolTable)

Constructs a shadow of the specified symbol table.

Method Summary

Modifier and TypeMethod and Description
public String
addSymbol(String
The new symbol.
symbol
)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.addSymbol.

Adds the specified symbol to the symbol table and returns a reference to the unique symbol.

public String
addSymbol(char[]
The buffer containing the new symbol.
buffer
,
int
The offset into the buffer of the new symbol.
offset
,
int
The length of the new symbol in the buffer.
length
)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.addSymbol.

Adds the specified symbol to the symbol table and returns a reference to the unique symbol.

public int
hash(String
The symbol to hash.
symbol
)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.hash.

Returns a hashcode value for the specified symbol.

public int
hash(char[]
The character buffer containing the symbol.
buffer
,
int
The offset into the character buffer of the start of the symbol.
offset
,
int
The length of the symbol.
length
)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.hash.

Returns a hashcode value for the specified symbol information.

Inherited from com.sun.org.apache.xerces.internal.util.SymbolTable:
containsSymbolcontainsSymbolrebalancerehash

Field Detail

fSymbolTableback to summary
protected SymbolTable fSymbolTable

Main symbol table.

Constructor Detail

ShadowedSymbolTableback to summary
public ShadowedSymbolTable(SymbolTable symbolTable)

Constructs a shadow of the specified symbol table.

Method Detail

addSymbolback to summary
public String addSymbol(String symbol)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.addSymbol.

Adds the specified symbol to the symbol table and returns a reference to the unique symbol. If the symbol already exists, the previous symbol reference is returned instead, in order guarantee that symbol references remain unique.

Parameters
symbol:String

The new symbol.

addSymbolback to summary
public String addSymbol(char[] buffer, int offset, int length)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.addSymbol.

Adds the specified symbol to the symbol table and returns a reference to the unique symbol. If the symbol already exists, the previous symbol reference is returned instead, in order guarantee that symbol references remain unique.

Parameters
buffer:char[]

The buffer containing the new symbol.

offset:int

The offset into the buffer of the new symbol.

length:int

The length of the new symbol in the buffer.

hashback to summary
public int hash(String symbol)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.hash.

Returns a hashcode value for the specified symbol. The value returned by this method must be identical to the value returned by the hash(char[],int,int) method when called with the character array that comprises the symbol string.

Parameters
symbol:String

The symbol to hash.

hashback to summary
public int hash(char[] buffer, int offset, int length)

Overrides com.sun.org.apache.xerces.internal.util.SymbolTable.hash.

Returns a hashcode value for the specified symbol information. The value returned by this method must be identical to the value returned by the hash(String) method when called with the string object created from the symbol information.

Parameters
buffer:char[]

The character buffer containing the symbol.

offset:int

The offset into the character buffer of the start of the symbol.

length:int

The length of the symbol.