help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Objects' (#rtl)

TSortedCollection.KeyOf

Return the key of an item

Declaration

Source position: objects.pp line 435

function TSortedCollection.KeyOf(

  Item: Pointer

):Pointer; virtual;

Description

KeyOf returns the key associated with Item. TSortedCollection returns the item itself as the key, descendent objects can override this method to calculate a (unique) key based on the item passed (such as hash values).

Keys are used to sort the objects, they are used to search and sort the items in the collection. If descendent types override this method then it allows possibly for faster search/sort methods based on keys rather than on the objects themselves.

Errors

None.

See also

TSortedCollection.IndexOf

  

Return index of an item in the collection.

TSortedCollection.Compare

  

Compare two items in the collection.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505