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

public final Class SynchronizedSymbolTable

extends SymbolTable
Class Inheritance

Synchronized symbol table. This class moved into the util package since it's needed by multiple other classes (CachingParserPool, XMLGrammarCachingConfiguration).
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
SynchronizedSymbolTable(SymbolTable symbolTable)

Constructs a synchronized symbol table.

public
public

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 boolean
containsSymbol(String
The symbol to look for.
symbol
)

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

Returns true if the symbol table already contains the specified symbol.

public boolean
containsSymbol(char[]
The buffer containing the symbol to look for.
buffer
,
int
The offset into the buffer.
offset
,
int
The length of the symbol in the buffer.
length
)

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

Returns true if the symbol table already contains the specified symbol.

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

Field Detail

fSymbolTableback to summary
protected SymbolTable fSymbolTable

Main symbol table.

Constructor Detail

SynchronizedSymbolTableback to summary
public SynchronizedSymbolTable(SymbolTable symbolTable)

Constructs a synchronized symbol table.

SynchronizedSymbolTableback to summary
public SynchronizedSymbolTable()
SynchronizedSymbolTableback to summary
public SynchronizedSymbolTable(int size)

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.

containsSymbolback to summary
public boolean containsSymbol(String symbol)

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

Returns true if the symbol table already contains the specified symbol.

Parameters
symbol:String

The symbol to look for.

containsSymbolback to summary
public boolean containsSymbol(char[] buffer, int offset, int length)

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

Returns true if the symbol table already contains the specified symbol.

Parameters
buffer:char[]

The buffer containing the symbol to look for.

offset:int

The offset into the buffer.

length:int

The length of the symbol in the buffer.