Class HashTable_V1<StructType extends AbstractPointer>
java.lang.Object
com.ibm.j9ddr.vm29.j9.HashTable<StructType>
com.ibm.j9ddr.vm29.j9.HashTable_V1<StructType>
- All Implemented Interfaces:
IHashTable<StructType>
- Direct Known Subclasses:
ModuleHashTable, ObjectToSparseDataHashTable, PackageHashTable
-
Nested Class Summary
Nested classes/interfaces declared in class HashTable
HashTable.HashEqualFunction<StructType>, HashTable.HashFunction<StructType>Modifier and TypeClassDescriptionstatic interfaceEncapsulation of the equal function needed by the HashTablestatic interfaceEncapsulation of the hash function needed by the HashTable -
Field Summary
Fields declared in class HashTable
_comparatorFn, _equalFn, _hashFn, _structType, _tableModifier 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_V1(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer hashTablePointer, boolean isInline, Class<StructType> structType, HashTable.HashEqualFunction<StructType> equalFn, HashTable.HashFunction<StructType> hashFn) protectedHashTable_V1(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer hashTablePointer, boolean isInline, Class<StructType> structType, HashTable.HashFunction<StructType> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType> comparatorFn) -
Method Summary
Modifier and TypeMethodDescriptionfind(StructType entry) Find an entry in the hash table.longgetCount()Returns the number of elements in a given pool.Returns the name of the tablebooleaniterator()Returns an iterator over the elements in the poolMethods declared in class HashTable
fromJ9HashTable, fromJ9HashTableModifier and TypeMethodDescriptionstatic <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.
-
Constructor Details
-
HashTable_V1
protected HashTable_V1(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer hashTablePointer, boolean isInline, Class<StructType> structType, HashTable.HashEqualFunction<StructType> equalFn, HashTable.HashFunction<StructType> hashFn) throws CorruptDataException - Throws:
CorruptDataException
-
HashTable_V1
protected HashTable_V1(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer hashTablePointer, boolean isInline, Class<StructType> structType, HashTable.HashFunction<StructType> hashFn, com.ibm.j9ddr.vm29.j9.HashTable.HashComparatorFunction<StructType> comparatorFn) throws CorruptDataException - Throws:
CorruptDataException
-
-
Method Details
-
isSpaceOpt
public boolean isSpaceOpt() -
getTableName
Description copied from class:HashTableReturns the name of the table- Specified by:
getTableNamein interfaceIHashTable<StructType extends AbstractPointer>- Specified by:
getTableNamein classHashTable<StructType extends AbstractPointer>- Returns:
- the number of elements in the pool
-
getCount
public long getCount()Description copied from class:HashTableReturns the number of elements in a given pool.- Specified by:
getCountin interfaceIHashTable<StructType extends AbstractPointer>- Specified by:
getCountin classHashTable<StructType extends AbstractPointer>- Returns:
- the number of elements in the pool
-
find
Description copied from class:HashTableFind an entry in the hash table.- Specified by:
findin classHashTable<StructType extends AbstractPointer>- Parameters:
entry-- Returns:
- NULL if entry is not present in the table; otherwise a pointer to the user-data
- Throws:
CorruptDataException
-
iterator
Description copied from class:HashTableReturns an iterator over the elements in the pool- Specified by:
iteratorin interfaceIHashTable<StructType extends AbstractPointer>- Specified by:
iteratorin classHashTable<StructType extends AbstractPointer>- Returns:
- an Iterator
-