System.Generics.Defaults.TDelegatedComparer
Delphi
TDelegatedComparer<T> = class(TComparer<T>)
C++
template<typename T> class PASCALIMPLEMENTATION TDelegatedComparer__1 : public TComparer__1<T>
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Generics.Defaults.pas System.Generics.Defaults.hpp |
System.Generics.Defaults | System.Generics.Defaults |
Description
TDelegatedComparer is a generic class that delegates all comparison calls to an user-provided callback routine.
The primary role of TDelegatedComparer is to delegate all calls made to its Compare method to an user supplied routine.
Use TDelegatedComparer when creating a descendant class from TComparer is not an option. Another useful feature of TDelegatedComparer is the fact that anonymous methods can be used in Delphi language to provide the required callbacks inline.
See Also
Code Examples