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: "Data structures of the most general kind, used to hold zero or more items.";
	status: "See notice at end of class";
	names: access;
	access: membership;
	contents: generic;
	date: "$Date: 2007-03-30 11:10:11 -0800 (Fri, 30 Mar 2007) $";
	revision: "$Revision: 95354 $"

deferred class CONTAINER [G]

feature -- Access

	has (v: G): BOOLEAN is
			-- Does structure include v?
			-- (Reference or object equality,
			-- based on object_comparison.)
		deferred
		ensure
			not_found_in_empty: Result implies notempty
		end;

feature -- Status report

	empty: BOOLEAN is
			-- Is there no element?
		deferred
		end;

	object_comparison: BOOLEAN;
			-- Must search operations use equal rather than =
			-- for comparing references? (Default: no, use =.)

	changeable_comparison_criterion: BOOLEAN is
			-- May object_comparison be changed?
			-- (Answer: yes by default.)
		do
			Result := true
		end;

feature -- Status setting

	compare_objects is
			-- Ensure that future search operations will use equal
			-- rather than = for comparing references.
		require
			changeable_comparison_criterion
		do
			object_comparison := true
		ensure
			object_comparison
		end;

	compare_references is
			-- Ensure that future search operations will use =
			-- rather than equal for comparing references.
		require
			changeable_comparison_criterion
		do
			object_comparison := false
		ensure
			reference_comparison: notobject_comparison
		end;

feature -- Conversion

	linear_representation: LINEAR [G] is
			-- Representation as a linear structure
		deferred
		end;

end -- class CONTAINER