INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Queues with a bounded physical size, implemented by arrays "
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: dispenser, array
cluster: eiffelbase
class BOUNDED_QUEUE [G]
inherit

QUEUE [G]
end

BOUNDED [G]
end
creation

make
feature -- Initialization

make (n: INTEGER)
-- Create queue for at most `n' items.
require
non_negative_argument: n >= 0
ensure
capacity_expected: capacity = n
feature -- Access

item: G
-- Oldest item.

has (v: G): BOOLEAN
-- Does queue include `v'?
-- (Reference or object equality,
-- based on `object_comparison'.)
feature -- Measurement

capacity: INTEGER
-- Number of items that may be kept.

count: INTEGER
-- Number of items.
feature -- Status report

off: BOOLEAN
-- Is there no current item?

prunable: BOOLEAN

resizable: BOOLEAN

extendible: BOOLEAN
feature -- Cursor movement

start
-- Move cursor to first position.

finish
-- Move cursor to last position.

forth
-- Move cursor to next position.
feature -- Element change

extend, force, put (v: G)
-- Add `v' as newest element.

replace (v: G)
-- Replace oldest item by `v'.
feature -- Removal

remove
-- Remove oldest item.

prune (v: G)

wipe_out
-- Remove all items.
feature -- Conversion

linear_representation: ARRAYED_LIST [G]
-- Representation as a linear structure
-- (in the original insertion order)
feature -- Measurement

occurrences (v: G): INTEGER
invariant

extendible_definition: extendible = not full
end -- class BOUNDED_QUEUE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES