TCustomBucketList class
Custom bucket list class.
Declaration
TCustomBucketList = class(TObject)Inheritance
- TCustomBucketList
- TObject
Descends from it: TBucketList
Description
TCustomBucketList is an associative list using buckets for storage.
It scales better than a regular
TList
list class, especially when an item must be searched in the list.
Since the list associates a data pointer with each item pointer, it follows that each item pointer must be unique, and can be added to the list only once.
The TCustomBucketList class does not determine the number of
buckets or the bucket hash mechanism, this must be done by descendent
classes such as TBucketList. TCustomBucketList
only takes care of storage and retrieval of items in the various buckets.
Because TCustomBucketList is an abstract class - it does not determine the number of
buckets - one should never instantiate an instance of TCustomBucketList, but always
use a descendent class such as TCustomBucketList.
See also
Properties
Buckets | protected | |
BucketCount | protected | |
Data | public | Associative array for data pointers. |
Methods
GetBucketItem | protected | |
AddItem | protected | |
BucketFor | protected | |
DeleteItem | protected | |
Error | protected | |
FindItem | protected | |
Destroy | public | Frees the bucketlist from memory. |
Clear | public | Clear the list. |
Add | public | Add an item to the list. |
Assign | public | Assign one bucket list to another. |
Exists | public | Check if an item exists in the list. |
Find | public | Find an item in the list. |
ForEach | public | Loop over all items. |
Remove | public | Remove an item from the list. |
Inherited
From TObject (41)
AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create 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.
