Returns true
iff x
comes before y
in the ordering.
Result of comparing x
with operand y
.
Result of comparing x
with operand y
.
Returns None
if operands are not comparable.
If operands are comparable, returns Some(r)
where
r < 0
iff x < y
r == 0
iff x == y
r > 0
iff x > y
Returns true
iff x
is equivalent to y
in the ordering.
Returns true
iff x
is equivalent to y
in the ordering.
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
Returns true
iff y
comes before x
in the ordering
and is not the same as x
.
Returns true
iff y
comes before x
in the ordering.
Returns true
iff x
comes before y
in the ordering
and is not the same as y
.
A trait for representing partial orderings. It is important to distinguish between a type that has a partial order and a representation of partial ordering on some type. This trait is for representing the latter.
A partial ordering is a binary relation on a type
T
, exposed as thelteq
method of this trait. This relation must be:lteq(x, x) == true
, for anyx
of typeT
.lteq(x, y) == true
andlteq(y, x) == true
thenequiv(x, y) == true
, for anyx
andy
of typeT
.lteq(x, y) == true
andlteq(y, z) == true
thenlteq(x, z) == true
, for anyx
,y
, andz
of typeT
.Additionally, a partial ordering induces an equivalence relation on a type
T
:x
andy
of typeT
are equivalent if and only iflteq(x, y) && lteq(y, x) == true
. This equivalence relation is exposed as theequiv
method, inherited from the Equiv trait.1.0, 2008-04-0-3
2.7