I was wondering how to get the number of items stored in a TBucketList. As far as I can see there is only the number of buckets and the bucket array available, so all I can think of is
Count := 0;
for I := 0 to BucketList.BucketCount - 1 do
Inc (Count, BucketList.Buckets [I].Count);
That does work but it seems odd to me, that I have to iterate through all buckets to find the number of items stored - something that is probably needed very often.
Am I missing another possibility? Or is there a reason why this container class does not provide a Count member like the other containers?
Thanks!