Sign in Join
FPDoc Onlineexperiment

TFPHashList class

In unit Contnrs

Hash list class for pointer data.

Declaration

pascal
TFPHashList = class(TObject)

Inheritance

  1. TFPHashList
  2. TObject

Description

TFPHashList implements a fast hash class. The class is built for speed, therefore the key values can be shortstrings only, and the data can only be non-nil pointers.

if a base class for an own hash class is wanted, the TFPCustomHashTable class can be used. If a hash class for objects is needed instead of pointers, the TFPHashObjectList class can be used.

See also

Properties

CountpublicCurrent number of elements in the list.
CapacitypublicCapacity of the list.
ItemspublicIndexed array with pointers.
ListpublicLow-level hash list.

Methods

CreatepublicCreate a new instance of the hashlist.
DestroypublicRemoves an instance of the hashlist from the heap.
AddpublicAdd a new key/data pair to the list.
ClearpublicClear the list.
NameOfIndexpublicReturns the key name of an item by index.
HashOfIndexpublicReturn the hash value of an item by index.
GetNextCollisionpublicGet next collision number.
DeletepublicDelete an item from the list.
ErrorpublicRaise an error.
ExtractpublicExtract a pointer from the list.
IndexOfpublicReturn the index of the data pointer.
FindpublicFind data associated with key.
FindIndexOfpublicReturn index of named item.
FindWithHashpublicFind first element with given name and hash value.
RenamepublicRename a key.
RemovepublicRemove first instance of a pointer.
PackpublicRemove nil pointers from the list.
ForEachCallpublicCall a procedure for each element in the list.

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.