+
Point of view
All features
deferred class COMPARABLE
Summary
All classes handling COMPARABLE objects with a total order relation should inherit from this class.
Direct parents
Insert list: ANY
Known children
Inherit list: ABSTRACT_STRING, FLOAT, INTEGRAL, MUTABLE_BIG_INTEGER, NATURAL_GENERAL, NUMBER, REPOSITORY_TRANSIENT_OBJECT, UNICODE_STRING
Insert list: CHARACTER, COMMAND_LINE_CONTEXT, MICROSECOND_TIME, TIME
Overview
Features
{ANY}
  • is_equal (other: COMPARABLE): BOOLEAN
    Is other attached to an object considered equal to current object?
  • infix "<" (other: COMPARABLE): BOOLEAN
    Is Current strictly less than other?
  • infix "<=" (other: COMPARABLE): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: COMPARABLE): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: COMPARABLE): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: COMPARABLE, upper: COMPARABLE): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • compare (other: COMPARABLE): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • three_way_comparison (other: COMPARABLE): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • min (other: COMPARABLE): COMPARABLE
    Minimum of Current and other.
  • max (other: COMPARABLE): COMPARABLE
    Maximum of Current and other.
  • bounded_by (a_min: COMPARABLE, a_max: COMPARABLE): COMPARABLE
    A value that is equal to Current if it is between the limits set by a_min and a_max.
is_equal (other: COMPARABLE): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
infix "<" (other: COMPARABLE): BOOLEAN
deferred function
{ANY}
Is Current strictly less than other?
infix "<=" (other: COMPARABLE): BOOLEAN
effective function
{ANY}
Is Current less than or equal other?
infix ">" (other: COMPARABLE): BOOLEAN
effective function
{ANY}
Is Current strictly greater than other?
infix ">=" (other: COMPARABLE): BOOLEAN
effective function
{ANY}
Is Current greater than or equal than other?
in_range (lower: COMPARABLE, upper: COMPARABLE): BOOLEAN
effective function
{ANY}
Return True if Current is in range [lower..upper]
See also min, max, compare.
compare (other: COMPARABLE): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
three_way_comparison (other: COMPARABLE): INTEGER_32
effective function
{ANY}
If current object equal to other, 0 if smaller, -1; if greater, 1.
min (other: COMPARABLE): COMPARABLE
effective function
{ANY}
Minimum of Current and other.
max (other: COMPARABLE): COMPARABLE
effective function
{ANY}
Maximum of Current and other.
bounded_by (a_min: COMPARABLE, a_max: COMPARABLE): COMPARABLE
effective function
{ANY}
A value that is equal to Current if it is between the limits set by a_min and a_max.