Class HashTable<StructType extends AbstractPointer>
java.lang.Object
com.ibm.j9ddr.vm29.j9.HashTable<StructType>
- All Implemented Interfaces:
 IHashTable<StructType>
- Direct Known Subclasses:
 HashTable_V1
public abstract class HashTable<StructType extends AbstractPointer>
extends Object
implements IHashTable<StructType>
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEncapsulation of the equal function needed by the HashTablestatic interfaceEncapsulation of the hash function needed by the HashTable - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType> protected HashTable.HashEqualFunction<StructType> protected HashTable.HashFunction<StructType> protected Class<StructType> protected com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, Class<StructType> structType, HashTable.HashEqualFunction<StructType> equalFn, HashTable.HashFunction<StructType> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType> comparatorFn)  - 
Method Summary
Modifier and TypeMethodDescriptionabstract StructTypefind(StructType entry) Find an entry in the hash table.static <T extends AbstractPointer>
HashTable<T> fromJ9HashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, boolean isInline, Class<T> structType, HashTable.HashEqualFunction<T> equalFn, HashTable.HashFunction<T> hashFn) Factory method to construct an appropriate hashtable handler.static <T extends AbstractPointer>
HashTable<T> fromJ9HashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, boolean isInline, Class<T> structType, HashTable.HashFunction<T> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<T> comparatorFn) Factory method to construct an appropriate hashtable handler.abstract longgetCount()Returns the number of elements in a given pool.abstract StringReturns the name of the tableabstract SlotIterator<StructType> iterator()Returns an iterator over the elements in the pool 
- 
Field Details
- 
_table
protected com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer _table - 
_structType
 - 
_equalFn
 - 
_hashFn
 - 
_comparatorFn
protected com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType extends AbstractPointer> _comparatorFn 
 - 
 - 
Constructor Details
- 
HashTable
protected HashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, Class<StructType> structType, HashTable.HashEqualFunction<StructType> equalFn, HashTable.HashFunction<StructType> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType> comparatorFn) throws CorruptDataException - Throws:
 CorruptDataException
 
 - 
 - 
Method Details
- 
fromJ9HashTable
public static <T extends AbstractPointer> HashTable<T> fromJ9HashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, boolean isInline, Class<T> structType, HashTable.HashEqualFunction<T> equalFn, HashTable.HashFunction<T> hashFn) throws CorruptDataException Factory method to construct an appropriate hashtable handler.- Type Parameters:
 T-- Parameters:
 structure- the J9HashTable structure to usestructType- the element typeequalFn- the equal functionhashFn- the hash function- Returns:
 - an instance of HashTable
 - Throws:
 CorruptDataException
 - 
fromJ9HashTable
public static <T extends AbstractPointer> HashTable<T> fromJ9HashTable(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer structure, boolean isInline, Class<T> structType, HashTable.HashFunction<T> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<T> comparatorFn) throws CorruptDataException Factory method to construct an appropriate hashtable handler.- Type Parameters:
 T-- Parameters:
 structure- the J9HashTable structure to usestructType- the element typehashFn- the hash functionequalFn- the equal function- Returns:
 - an instance of HashTable
 - Throws:
 CorruptDataException
 - 
getTableName
Returns the name of the table- Specified by:
 getTableNamein interfaceIHashTable<StructType extends AbstractPointer>- Returns:
 - the number of elements in the pool
 
 - 
getCount
public abstract long getCount()Returns the number of elements in a given pool.- Specified by:
 getCountin interfaceIHashTable<StructType extends AbstractPointer>- Returns:
 - the number of elements in the pool
 
 - 
find
Find an entry in the hash table.- Parameters:
 entry-- Returns:
 - NULL if entry is not present in the table; otherwise a pointer to the user-data
 - Throws:
 CorruptDataException
 - 
iterator
Returns an iterator over the elements in the pool- Specified by:
 iteratorin interfaceIHashTable<StructType extends AbstractPointer>- Returns:
 - an Iterator
 
 
 -