interface CanEqual<T>
Interface CanEqual<T> specifies that a class can be tested for equality with an object of type T, producing a boolean which is true if the objects are identical. This interface allows overloading of the == operator. If this operator is applied, the appropriate equal(T) method will be called.
| Modifiers | Return Types | Method and Description |
|---|---|---|
public readonly |
(boolean) |
equal(T other)Method called when the |
public readonly equal(T other) => (boolean)
Method called when the == operator is applied. Should return true if the current object is identical to the other object. The relation defined by this method should be reflexive, symmetric, and transitive.
other - object to compare to
true if identical