| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv boolean | |
| pack-priv int[] | |
| pack-priv int[] | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public HashIndex | |
| public int | |
| public int | |
| public int | |
| public int | Returns: either -1 or the first node for this hash valuethe hash value used for indexing hash)Return the array index for a hash. |
| public int | |
| public int | Returns: either -1 or the next node from this nodeA valid node to look from lookup)This looks from a given node, so the parameter is always |
| public boolean | Returns: true if node found in unlinked statethe node to remove lookup)Insert a node. |
| public int | Returns: the new nodean index into hashTable index, final int either -1 or the node to which the new node will be linked lastLookup)Link a new node into the linked list for a hash index. |
| public boolean | Returns: true if node found in unlinked statethe node to remove lookup)Remove a node that has already been unlinked. |
| public void | |
| public void | |
| public void | unlinkNode(int
an index into hashTable index, int either -1 or the node to which the target node is linked lastLookup, int the node to remove lookup)Unlink a node from a linked list and link into the reclaimed list. |
| elementCount | back to summary |
|---|---|
| pack-priv int elementCount | |
| fixedSize | back to summary |
|---|---|
| pack-priv boolean fixedSize | |
| hashTable | back to summary |
|---|---|
| pack-priv int[] hashTable | |
| linkTable | back to summary |
|---|---|
| pack-priv int[] linkTable | |
| modified | back to summary |
|---|---|
| pack-priv boolean modified | |
| newNodePointer | back to summary |
|---|---|
| pack-priv int newNodePointer | |
| reclaimedNodePointer | back to summary |
|---|---|
| pack-priv int reclaimedNodePointer | |
| HashIndex | back to summary |
|---|---|
| public HashIndex(int hashTableSize, int capacity, boolean fixedSize) | |
| clear | back to summary |
|---|---|
| public void clear() Reset the index as empty. | |
| clone | back to summary |
|---|---|
| public HashIndex clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| getElementCount | back to summary |
|---|---|
| public int getElementCount() | |
| getHashIndex | back to summary |
|---|---|
public int getHashIndex(int hash)
| |
| getLimitPointer | back to summary |
|---|---|
| public int getLimitPointer() | |
| getLookup | back to summary |
|---|---|
| public int getLookup(int hash) Return the array index for a hash.
| |
| getNewNodePointer | back to summary |
|---|---|
| public int getNewNodePointer() Return the pointer | |
| getNextLookup | back to summary |
|---|---|
| public int getNextLookup(int lookup) This looks from a given node, so the parameter is always
| |
| insertEmptyNode | back to summary |
|---|---|
| public boolean insertEmptyNode(int lookup) Insert a node.
| |
| linkNode | back to summary |
|---|---|
| public int linkNode(int index, final int lastLookup) Link a new node into the linked list for a hash index.
| |
| removeEmptyNode | back to summary |
|---|---|
| public boolean removeEmptyNode(int lookup) Remove a node that has already been unlinked. This is not required for index operations. It is used only when the row needs to be removed from the data structures that store the actual indexed data and the nodes need to be contiguous.
| |
| reset | back to summary |
|---|---|
| public void reset(int hashTableSize, int capacity) Reset the structure with a new size as empty.
| |
| resetTables | back to summary |
|---|---|
| public void resetTables() | |
| unlinkNode | back to summary |
|---|---|
| public void unlinkNode(int index, int lastLookup, int lookup) Unlink a node from a linked list and link into the reclaimed list.
| |