INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Sorted tables: containers which store their two element", "entries (element or item itself and the associated key) in", "a total relation order (ascending) based on the operations", "of class COMPARABLE (the Eiffel Kernel) being done on keys"
project: "Visual Eiffel"
revision: "$Revision: 1.2 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: containers
class SORTED_TABLE_ [G, H -> COMPARABLE]
inherit

TABLE_ [G, H]
redefine
current_keys,
find_next,
guide,
make
end
creation

make
feature -- Operations

make (is_unique: BOOLEAN)
-- tells the container if its entries must be unigue
feature -- Queries

current_keys: LIST_ [H]
-- delivers all the keys (without duplicates) currently stored in
-- the table

cursor_after (k: H): CURSOR_
-- delivers a new cursor positioned to the entry the key of which
-- is closest to and greater than 'k' - the presence of entry with
-- key 'k' is not essential but if currently there are at all no
-- such entries in the table then Void is delivered
require
proper_key: k /= void
ensure
well_done: Result /= void implies is_protected

cursor_before (k: H): CURSOR_
-- delivers a new cursor positioned to the entry the key of which
-- is closest to and less than 'k' - the presence of entry with
-- key 'k' is not essential but if currently there are at all no
-- such entries in the table then Void is delivered
require
proper_key: k /= void
ensure
well_done: Result /= void implies is_protected
end -- class SORTED_TABLE_

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES