Indicates whether the objects passed as a
and b
are equal.
Indicates whether the objects passed as a
and b
are equal.
a left-hand value being compared with another (right-hand-side one) for equality (e.g., a == b
)
a right-hand value being compared with another (left-hand-side one) for equality (e.g., a == b
)
true if the passed objects are "equal," as defined by this Equality
instance
Returns an integer whose sign indicates how x compares to y.
Returns an integer whose sign indicates how x compares to y.
The result sign has the following meaning:
areEqual(x, y)
)For more detail on the contract of this method, see the main documentation for this trait.
Returns a hash code for the specified object that is consistent with areEqual
.
Returns a hash code for the specified object that is consistent with areEqual
.
See the main documentation of this trait for more detail on the contract of hashCodeFor
.
A final implementation of the areEquivalent
method of Equivalence
that just passes
a
and b
to areEqual
and returns the result.
A final implementation of the areEquivalent
method of Equivalence
that just passes
a
and b
to areEqual
and returns the result.
This method enables any Equality
to be used where an Equivalence
is needed, such
as the implicit enabling methods of TypeCheckedTripleEquals
and ConversionCheckedTripleEquals
.
a left-hand value being compared with another, right-hand, value for equality (e.g., a == b
)
a right-hand value being compared with another, left-hand, value for equality (e.g., a == b
)
true if the passed objects are "equal," as defined by the areEqual
method of this
Equality
instance
Returns true if a
> b
in the total order defined by this OrderingEquality
.
Returns true if a
> b
in the total order defined by this OrderingEquality
.
Returns true if a
>= b
in the total order defined by this OrderingEquality
.
Returns true if a
>= b
in the total order defined by this OrderingEquality
.
Returns true if a
< b
in the total order defined by this OrderingEquality
.
Returns true if a
< b
in the total order defined by this OrderingEquality
.
Returns true if a
<= b
in the total order defined by this OrderingEquality
.
Returns true if a
<= b
in the total order defined by this OrderingEquality
.
Returns a
if a
>= b
, otherwise b
, according to the total order defined by this OrderingEquality
.
Returns a
if a
>= b
, otherwise b
, according to the total order defined by this OrderingEquality
.
Returns a
if a
<= b
, otherwise b
, according to the total order defined by this OrderingEquality
.
Returns a
if a
<= b
, otherwise b
, according to the total order defined by this OrderingEquality
.
A
HashingEquality[T]
that offers acompare
method that indicates whether two objects of typeT
are greater than, less than, or equal to each other.Instances of this trait must define a total ordering on objects of type
T
that is consistent withareEqual
according to the following:null
valuesx
andy
,(compare(a, b) == 0) == areEqual(x, y)
must returntrue
.null
valuex
,compare(x, null)
must throwNullPointerException
.null
valuex
,compare(null, x)
must throwNullPointerException
.compare(null, null)
must throwNullPointerException
.