Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

kernel.misc

Class KL_PART_COMPARABLE


Known direct descendants

MA_DECIMAL, ET_POSITION, DT_DURATION

Features

Invariants

indexing

description

Objects that may be compared according to a partial order relation

remark

The basic operation is < (less than); others %
%are defined in terms of this operation and is_equal.

library

Gobo Eiffel Kernel Library

copyright

Copyright (c) 2000, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/02/27 16:55:52 $

revision

$Revision: 1.4 $

deferred class

KL_PART_COMPARABLE

feature -- Comparison

infix "<" (other: like Current): BOOLEAN

-- Is current object less than other?

require
other_not_void: other /= Void
infix "<=" (other: like Current): BOOLEAN

-- Is current object less than or equal to other?

require
other_not_void: other /= Void
ensure
definition: Result = ((Current < other) or is_equal (other))
infix ">" (other: like Current): BOOLEAN

-- Is current object greater than other?

require
other_not_void: other /= Void
ensure
definition: Result = (other < Current)
infix ">=" (other: like Current): BOOLEAN

-- Is current object greater than or equal to other?

require
other_not_void: other /= Void
ensure
definition: Result = ((other < Current) or is_equal (other))

invariant

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end