This site contains older material on Eiffel. For the main Eiffel page, see http://www.eiffel.com.

EiffelBase class
(HTML page generated by ISE Eiffel 4.2)

Eiffel Class
indexing
	description: "Objects that may be compared according to a partial order relation";
	status: "See notice at end of class";
	names: part_comparable, comparison;
	date: "$Date: 2007-03-30 19:10:11 +0000 (Fri, 30 Mar 2007) $";
	revision: "$Revision: 95354 $"

deferred class PART_COMPARABLE

feature -- Comparison

	infix "<" (other: like Current): BOOLEAN is
			-- Is current object less than other?
		require
			other_exists: other /= void
		deferred
		end;

	infix "<=" (other: like Current): BOOLEAN is
			-- Is current object less than or equal to other?
		require
			other_exists: other /= void
		do
			Result := (Current < other) or is_equal (other)
		end;

	infix ">" (other: like Current): BOOLEAN is
			-- Is current object greater than other?
		require
			other_exists: other /= void
		do
			Result := other < Current
		end;

	infix ">=" (other: like Current): BOOLEAN is
			-- Is current object greater than or equal to other?
		require
			other_exists: other /= void
		do
			Result := (other < Current) or is_equal (other)
		end;

end -- class PART_COMPARABLE