System.Generics.Defaults.TComparer

From RAD Studio API Documentation
Jump to: navigation, search

System.TInterfacedObjectSystem.TObjectTComparer

Delphi

TComparer<T> = class(TInterfacedObject, IComparer<T>)

C++

template<typename T> class PASCALIMPLEMENTATION TComparer__1 : public System::TInterfacedObject

Properties

Type Visibility Source Unit Parent
class public
System.Generics.Defaults.pas
System.Generics.Defaults.hpp
System.Generics.Defaults System.Generics.Defaults

Description

TComparer is a generic base for classes that implement the IComparer interface.

TComparer is an abstract base class for IComparer implementations and a provider of default IComparer implementations.

Use TComparer as a base for custom comparer classes. The Compare method is abstract and must be implemented in descendant classes.

TComparer also provides the possibility to create a default comparer for a given data type.

See Also

Code Examples