INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Unbounded queues, implemented by resizable 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 ARRAYED_QUEUE [G]
inherit

QUEUE [G]
undefine
consistent,
copy,
is_equal,
prune_all,
setup
redefine
empty
select
count,
empty,
put
end

ISE_ARRAY [G]
rename
count as array_count,
force as force_i_th,
item as i_th,
make as array_make,
put as put_i_th,
grow as array_grow,
empty as array_empty
export
{NONE}
all
redefine
extend,
extendible,
full,
has,
linear_representation,
prunable,
wipe_out
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

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

empty, off: BOOLEAN
-- Is the structure empty?

full: BOOLEAN
-- Is structure filled to capacity?
-- (Answer: no.)

extendible: BOOLEAN
-- May items be added? (Answer: yes.)

prunable: BOOLEAN
-- May items be removed? (Answer: yes.)
feature -- Element change

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

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

remove
-- Remove oldest item.

wipe_out
-- Remove all items.
feature -- Conversion

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

not_full: not full
extendible: extendible
prunable: prunable
end -- class ARRAYED_QUEUE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES