TComparator
Abstract base class for facilities that can compare elements of type
TElement
.Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TBaseObject | A base class for objects that can be used instead of TObject . |
3 | TReferenceCountedObject | Object that keeps track of the number of times it is referenced from other objects |
4 | TComparator |
Source
Comparator.pas (26)
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | public | TSign | Compare(Left: TElement; Right: TElement) |
Returns a TSign to indicate the comparison result. One way use this return value
is to compare it to sZero using the normal relational operators = ,
<> , < , <= , > and >= . Should
return sPositive if Left is greater than Right ,
sNegative if it is smaller, and sZero if they are equal.
|
Instance | public | TBoolean | Equal(Left: TElement; Right: TElement) | |
Instance | public | TBoolean | GreaterThan(Left: TElement; Right: TElement) | |
Instance | public | TBoolean | GreaterThanOrEqual(Left: TElement; Right: TElement) | |
Instance | public | TBoolean | LessThan(Left: TElement; Right: TElement) | |
Instance | public | TBoolean | LessThanOrEqual(Left: TElement; Right: TElement) |