note description: "References to objects containing a boolean value." library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2020-05-10 07:15:38 +0000 (Sun, 10 May 2020) $" revision: "$Revision: 104128 $" class interface BOOLEAN_REF create default_create feature -- Access item: BOOLEAN -- Boolean value. hash_code: INTEGER_32 -- Hash code value. feature -- Conversion to_reference: BOOLEAN_REF -- Associated reference of Current. ensure to_reference_not_void: Result /= Void same_item: Result.item = item to_integer: INTEGER_32 -- 1 if True. -- 0 if False. ensure not_item_implies_zero: not item implies Result = 0 item_implies_one: item implies Result = 1 feature -- Element change set_item (b: BOOLEAN) -- Make b the item value. feature -- Basic operations conjuncted alias "and" alias "∧" (other: like Current): BOOLEAN -- Boolean conjunction with other. require other_exists: other /= Void ensure de_morgan: Result = not (not Current or not other) commutative: Result = (other and Current) consistent_with_semi_strict: Result implies (Current and then other) conjuncted_semistrict alias "and then" alias "∧…" (other: like Current): BOOLEAN -- Boolean semi-strict conjunction with other. require other_exists: other /= Void ensure de_morgan: Result = not (not Current or else not other) implication alias "implies" alias "⇒" (other: like Current): BOOLEAN -- Boolean implication of other. -- (semi-strict) require other_exists: other /= Void ensure definition: Result = (not Current or else create {BOOLEAN}.make_from_reference (other)) negated alias "not" alias "¬": BOOLEAN -- Negation. disjuncted alias "or" alias "∨" (other: like Current): BOOLEAN -- Boolean disjunction with other. require other_exists: other /= Void ensure de_morgan: Result = not (not Current and not other) commutative: Result = (other or Current) consistent_with_semi_strict: Result implies (Current or else other) disjuncted_semistrict alias "or else" alias "∨…" (other: like Current): BOOLEAN -- Boolean semi-strict disjunction with other. require other_exists: other /= Void ensure de_morgan: Result = not (not Current and then not other) disjuncted_exclusive alias "xor" alias "⊻" (other: like Current): BOOLEAN -- Boolean exclusive or with other. require other_exists: other /= Void ensure definition: Result = ((Current or other) and not (Current and other)) feature -- Output out: STRING_8 -- Printable representation of boolean. invariant involutive_negation: (not (not Current)).item = item non_contradiction: not ((not Current) and create {BOOLEAN}.make_from_reference (Current)) completeness: (not Current) or create {BOOLEAN}.make_from_reference (Current) note ca_ignore: "CA015", "CA015: double negation" copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class BOOLEAN_REF
Generated by ISE EiffelStudio