|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.irs.jam.Table
Represents a general table of String-hashed and linearly stored objects
Field Summary | |
protected DList[] |
_hashTable
|
protected int |
_hashTableSize
|
protected int |
_nextID
|
static int |
_NullId
|
protected TableObject[] |
_table
|
protected int |
_tableIncrementSize
|
protected int |
_tableSize
|
Constructor Summary | |
Table()
Default constructor |
|
Table(int tabSz,
int tabIncSz,
int hashTabSz)
Constructor with suggested sizes |
Method Summary | |
TableObject |
add(TableObject obj)
Add an entry to the table based on the objects name. |
TableObject |
add(TableObject obj,
java.lang.String hashName)
Add an entry to the table based on the name specified as a parameter. |
DList |
getBucket(java.lang.String name)
Return the entire list of symbols in the table that match the specified label. |
DList |
getBucket(TableObject obj)
Return the entire list of symbols in the table that match the objects label. |
int |
getSize()
|
protected int |
hash(java.lang.String name)
Calculate the hash for the symbol with the specified label |
TableObject |
lookup(int id)
Retrieve the symbol referenced by the specified identifier |
TableObject |
lookup(java.lang.String name)
Retrieve the symbol referenced by the specified label |
TableObject |
lookup(TableObject obj)
Return the first symbol entry with the same hash as the specified object. |
void |
print(java.io.PrintStream s)
Output information in a non inline manner. |
TableObject |
replace(TableObject oldObj,
TableObject newObj)
Put the new object in place of the old object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int _NullId
protected TableObject[] _table
protected DList[] _hashTable
protected int _tableSize
protected int _hashTableSize
protected int _nextID
protected int _tableIncrementSize
Constructor Detail |
public Table()
public Table(int tabSz, int tabIncSz, int hashTabSz)
Method Detail |
public int getSize()
protected int hash(java.lang.String name)
public TableObject lookup(int id)
public TableObject lookup(java.lang.String name)
public TableObject lookup(TableObject obj)
public TableObject add(TableObject obj)
public TableObject add(TableObject obj, java.lang.String hashName)
public TableObject replace(TableObject oldObj, TableObject newObj)
public DList getBucket(java.lang.String name)
public DList getBucket(TableObject obj)
public void print(java.io.PrintStream s)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |