RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomBucketList.BucketFor Method

Returns the index of the bucket in which a specified item belongs.

Pascal
function BucketFor(AItem: Pointer): Integer; virtual; abstract;
C++
virtual __fastcall int BucketFor(void * AItem) = 0;

TCustomBucketList uses BucketFor internally to determine the bucket into which an arbitrary item belongs. TCustomBucketList introduces BucketFor as an abstract (pure virtual) method, which means it has no implementation. Descendant classes must override BucketFor to provide an implementation that determines the bucket for an arbitrary item. 

AItem is the item for which you want to find a bucket. 

BucketFor returns the index of the bucket in the Buckets property array. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!