
-- This class is very usefull as many objects such as integers and
-- strings are sortable. It will allow to get best benefits from
-- sorted structured such as trees.

indexing

  names: sorted, sortable, comparable;
  size: unlimited;
  contents: sortable, comparable;

  author: "Guichard Damien";
  created: 19,January,1996;
  modified: 19,January,1996

deferred class SORTABLE  -- Provide sortable entities.
  inherit COLLECTION
    undefine is_equal  -- Undefine a feature from ANY just for fun and
    end                -- consistency with is_less and is_greater.
feature{ANY}
  is_less (other:like Current):BOOLEAN is
    -- Is 'other' less than current object?
    require  -- other /= Void
    deferred
    end;  -- is_less
  is_greater (other:like Current):BOOLEAN is
    -- Is 'other' greater than current object?
    require  -- other /= Void
    deferred
    end   -- greater
end  -- class 'SORTABLE'

