TFPCustomHashTable class
Hash class.
Declaration
TFPCustomHashTable = class(TObject)Inheritance
- TFPCustomHashTable
- TObject
Descends from it: TFPDataHashTable TFPObjectHashTable TFPStringHashTable TLazFPGHashTable
Description
TFPCustomHashTable is a general-purpose hashing class.
It can store string keys and pointers associated with these strings.
The hash mechanism is configurable and can be optionally be specified
when a new instance of the class is created; A default hash mechanism
is implemented in
RSHash.
The TFPHashList can also be used when fast
lookup of data based on some key is required. It is slightly faster than
the TFPCustomHashTable implementation, but the keys are limited
to a length of 256 characters, and it is not suitable for re-use: it is a
one-time fill, many times search object. TFPCustomHashTable is
slower, but handles re-use better.
See also
Properties
HashFunction | public | Hash function currently in use. |
Count | public | Number of items in the hash table. |
HashTableSize | public | Size of the hash table. |
HashTable | public | Hash table instance. |
VoidSlots | public | Number of empty slots in the hash table. |
LoadFactor | public | Fraction of count versus size. |
AVGChainLen | public | Average chain length. |
MaxChainLength | public | Maximum chain length. |
NumberOfCollisions | public | Number of extra items. |
Density | public | Number of filled slots. |
Methods
Chain | protected | |
CreateNewNode | protected | |
AddNode | protected | |
ChainLength | protected | |
FindOrCreateNew | protected | |
SetHashFunction | protected | |
FindChainForAdd | protected | |
Create | public | Instantiate a new TFPCustomHashTable instance using the default hash mechanism. |
CreateWith | public | Instantiate a new TFPCustomHashTable instance with given algorithm and size. |
Destroy | public | Free the hash table. |
ChangeTableSize | public | Change the table size of the hash table. |
Clear | public | Clear the hash table. |
Delete | public | Delete a key from the hash list. |
Find | public | Search for an item with a certain key value. |
IsEmpty | public | Check if the hash table is empty. |
Fields
FHashTableSize | protected |
Inherited
From TObject (40)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
