API:System.Generics.Defaults.TEqualityComparer.Equals

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Equals(const Left, Right: T): Boolean;

C++

HIDESBASE virtual bool __fastcall Equals(const T Left, const T Right) = 0 /* overload */;

Properties

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

Description

Checks whether the current instance and the Obj parameter are equal.

System.Generics.Defaults.TEqualityComparer.Equals inherits from System.TObject.Equals. All content below this line refers to System.TObject.Equals.

Checks whether the current instance and the Obj parameter are equal.

The function has one Obj parameter of the TObject type.

By default, the Equals method shows whether the addresses corresponding to the current object and the Obj object are identical. The method returns a boolean value that represents the equality between the two addresses.

Note: Equals is supposed to be overridden in user-derived classes, to provide consumer objects with an equality determining function. For example, in the FMX.Types.TBounds class, Equals also returns True if the Rect properties of the current object and of the Obj object are equal. In the FMX.StdActns.TBaseValueRange class, Equals also returns True if all the properties of the current object and of the Obj object are equal.

See Also