INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Queues: dispensers implementing a first-in, first-out policy"
project: "Visual Eiffel"
revision: "$Revision: 1.2 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: containers
class QUEUE_ [G]
inherit

DISPENSER_ [G]
end
feature -- Operations

put (x: G)
-- adds the new entry into the dispenser
require
valid_item: x /= void

remove
-- deletes the "active entry" and sets 'item' to the one that has
-- been in the dispenser for the longest time if there are no more
-- entries after the removal - 'item' is set to Void, to be exact,
-- is set to to the default value of the type ...
ensure
well_done: cs.is_finished
feature -- Queries

list_of_elements: LIST_ [G]
-- delivers all the entries of the dispenser in the order in
-- which they would be repeatedly removed if it really happened
ensure
well_done: cs /= void implies cs.is_finished
end -- class QUEUE_

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES