Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:
indexing description: "A logging priority." project: "Project Goanna <http://sourceforge.net/projects/goanna>" library: "log4e" date: "$Date$" revision: "$Revision$" author: "Glenn Maughan <glennmaughan@goanna.info>" copyright: "Copyright (c) 2002 Glenn Maughan" license: "Eiffel Forum License v1 (see forum.txt)." class interface L4E_PRIORITY create make (new_level: INTEGER; desc: STRING) -- Create new priority require positive_level: new_level > 0 desc_exists: desc /= void feature -- Comparison is_equal (other: like Current): BOOLEAN -- Is other attached to an object of the same type -- as current object and identical to it? -- (from COMPARABLE) require -- from ANY other_not_void: other /= void ensure -- from ANY symmetric: Result implies other.is_equal (Current) consistent: standard_is_equal (other) implies Result ensure then -- from COMPARABLE trichotomy: Result = (not (Current < other) and not (other < Current)) max (other: like Current): like Current -- The greater of current object and other -- (from COMPARABLE) require -- from COMPARABLE other_exists: other /= void ensure -- from COMPARABLE current_if_not_smaller: Current >= other implies Result = Current other_if_smaller: Current < other implies Result = other min (other: like Current): like Current -- The smaller of current object and other -- (from COMPARABLE) require -- from COMPARABLE other_exists: other /= void ensure -- from COMPARABLE current_if_not_greater: Current <= other implies Result = Current other_if_greater: Current > other implies Result = other three_way_comparison (other: like Current): INTEGER -- If current object equal to other, 0; -- if smaller, -1; if greater, 1 -- (from COMPARABLE) require -- from COMPARABLE other_exists: other /= void ensure -- from COMPARABLE equal_zero: (Result = 0) = is_equal (other) smaller_negative: (Result = - 1) = (Current < other) greater_positive: (Result = 1) = (Current > other) infix "<" (other: like Current): BOOLEAN -- Is 'other' less than Current? require -- from PART_COMPARABLE other_exists: other /= void ensure then -- from COMPARABLE asymmetric: Result implies not (other < Current) infix "<=" (other: like Current): BOOLEAN -- Is current object less than or equal to other? -- (from COMPARABLE) require -- from PART_COMPARABLE other_exists: other /= void ensure then -- from COMPARABLE definition: Result = ((Current < other) or is_equal (other)) infix ">" (other: like Current): BOOLEAN -- Is current object greater than other? -- (from COMPARABLE) require -- from PART_COMPARABLE other_exists: other /= void ensure then -- from COMPARABLE definition: Result = (other < Current) infix ">=" (other: like Current): BOOLEAN -- Is current object greater than or equal to other? -- (from COMPARABLE) require -- from PART_COMPARABLE other_exists: other /= void ensure then -- from COMPARABLE definition: Result = (other <= Current) feature -- Initialisation make (new_level: INTEGER; desc: STRING) -- Create new priority require positive_level: new_level > 0 desc_exists: desc /= void feature -- Status Report level: INTEGER -- Level at which this priority is invoked. level_str: STRING -- String description of this priority invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) -- from COMPARABLE irreflexive_comparison: not (Current < Current) end -- class L4E_PRIORITY
Classes Clusters Cluster hierarchy Relations Contracts Flat contracts Go to:

Goanna Log4E -- Copyright © 2002 Glenn Maughan