INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "General container data structures, ", "characterized by the membership properties of their items. "
title: "EiffelBase: library of reusable components for Eiffel. ", "Based on EiffelBase library for ISE Eiffel, ", "used with permission. "
project: "EiffelBase Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
key: collection, access
cluster: eiffelbase
deferred class COLLECTION [G]
inherit

CONTAINER [G]
end
feature -- Status report

extendible: BOOLEAN
-- May new items be added?

prunable: BOOLEAN
-- May items be removed?
feature -- Element change

put, extend (v: G)
-- Ensure that structure includes `v'.
require
extendible: extendible
ensure
item_inserted: has (v)

fill (other: CONTAINER [G])
-- Fill with as many items of `other' as possible.
-- The representations of `other' and current structure
-- need not be the same.
require
other_not_void: other /= void
extendible
feature -- Removal

prune (v: G)
-- Remove one occurrence of `v' if any.
-- (Reference or object equality,
-- based on `object_comparison'.)
require
prunable: prunable

prune_all (v: G)
-- Remove all occurrences of `v'.
-- (Reference or object equality,
-- based on `object_comparison'.)
--|Default implementation, usually inefficient.
require
prunable
ensure
no_more_occurrences: not has (v)

wipe_out
-- Remove all items.
require
prunable
ensure
wiped_out: empty
end -- class COLLECTION

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES