Comparable

Comparable: compare

Ordering: Less, Equal, Greater

Functions: operator==, operator<

interface Comparable

A type whose instances have an inherent sort-order, i.e. can be compared with the <, <=, >, >= operators.

compare

Ordering compare(This& other);

Returns Ordering.Less if this is less than other, Ordering.Equal if this is equal to other, or Ordering.Greater if this is greater than other.

enum Ordering

The result of comparing two values.

Less

Less

Less than.

Equal

Equal

Equal.

Greater

Greater

Greater than.

operator==

bool operator== <T: Comparable>(T& a, T& b)

Returns true if a equals b.

operator<

bool operator< <T: Comparable>(T& a, T& b)

Returns true if a is less than b.