Warning
|
Deprecated since Delphi XE4. Please use the RSInterfaceCollections|TIHashTable class instead.
|
The TIHashtableEnumerator class provides an enumeration of all the values in a InterfaceCollections.TIHashTable object, it implements the CommonInterfaces.IInterfaceIterator interfaces. The TGHashtableEnumerator provides access to all the keys or items stored in the TGCustomHashTable object. The object provides functionality similar to an Enumeration in java.
To use the enumerator is simple, set the Keys property to True (return Keys) or False (return items) and then keep calling the NextElement method until the HasMoreElements method returns False. The enumerator works by giving you the next element until the end of the list, there is no provision for getting the previous element. The enumerator manages its own memory and will free itself when it is completely dereferenced (as long as you use an interface to access it).
Note
|
The enumeration guarantees no ordering in the manner that the next element returns items. It just guarantees all items will be returned eventually, with no item appearing twice.
|
Namespace: InterfaceCollections
TInterfacedObject
InterfaceCollections.TIHashtableEnumerator
|
|
Name
|
Description
|
|
Count
|
Returns the number of items left in the enumeration.
|
|
Current
|
Represents property Current.
|
|
OldEntry
|
Represents property OldEntry.
|
Top
|
|
Name
|
Description
|
|
CurrentElement
|
Returns the current item in the enumeration, your "place" in the enumeration.
When the iterator is first supplied or when it is Reset, there is no current element (calling this method in such a case should raise an exception). Only after the first call to the NextElement method will this method return a value.
Unlike the NextElement method which returns a new value every time you call it, this method always returns the same value no matter how many times you call it (until NextElement is called, of course).
|
|
CurrentKey
|
Represents method CurrentKey.
|
|
GetCount
|
Returns the number of items left in the enumeration.
Accessor method for Count property.
Note
|
Required by VCL.Net
|
|
|
GetCurrent
|
Represents method GetCurrent.
|
|
HasMoreElements
|
Returns True if there are more elements to retrieve from the enumeration. While this method returns true, the NextElement method should not raise an exception.
|
|
MoveNext
|
Represents method MoveNext.
|
|
NextElement
|
Returns the next item in the enumeration. If there are no more items, the method should raise an exception.
To check if there are more items, use the HasMoreElements method. The NextElement method advances its place in the enumeration and then returns that item. Every call to NextElement returns a new item (until the end of the enumeration). If you wish to access the current item multiple times in a loop, use the CurrentElement method.
|
|
NextEntry
|
Represents method NextEntry.
|
|
NextKey
|
Represents method NextKey.
|
|
Reset
|
Resets the iterator to the beginning of the enumeration.
|
Top
|