Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:
indexing description: "Sequential, one-way linked lists" status: "See notice at end of class" names: linked_list, sequence representation: linked access: index, cursor, membership contents: generic date: "$Date: 2001-11-16 20:32:23 +0000 (Fri, 16 Nov 2001) $" revision: "$Revision: 51435 $" class interface LINKED_LIST [G] create make feature -- Initialization make -- Create an empty list. ensure is_before: before feature -- Access item: G -- Current item first: like item -- Item at first position last: like item -- Item at last position index: INTEGER -- Index of current position cursor: CURSOR -- Current cursor position feature -- Measurement count: INTEGER -- Number of items feature -- Status report readable: BOOLEAN -- Is there a current item that may be read? after: BOOLEAN -- Is there no valid cursor position to the right of cursor? before: BOOLEAN -- Is there no valid cursor position to the left of cursor? off: BOOLEAN -- Is there no current item? isfirst: BOOLEAN -- Is cursor at first position? islast: BOOLEAN -- Is cursor at last position? valid_cursor (p: CURSOR): BOOLEAN -- Can the cursor be moved to position p? Full: BOOLEAN is False -- Is structured filled to capacity? (Answer: no.) is_inserted (v: G): BOOLEAN -- Has v been inserted at the end by the most recent put or -- extend? feature -- Cursor movement start -- Move cursor to first position. ensure then empty_convention: is_empty implies after finish -- Move cursor to last position. -- (Go before if empty) ensure then empty_convention: is_empty implies before forth -- Move cursor to next position. back -- Move to previous item. move (i: INTEGER) -- Move cursor i positions. The cursor -- may end up off if the offset is too big. ensure then moved_if_inbounds: ((old index + i) >= 0 and (old index + i) <= (count + 1)) implies index = (old index + i) before_set: (old index + i) <= 0 implies before after_set: (old index + i) >= (count + 1) implies after go_i_th (i: INTEGER) -- Move cursor to i-th position. go_to (p: CURSOR) -- Move cursor to position p. feature -- Element change put_front (v: like item) -- Add v to beginning. -- Do not move cursor. extend (v: like item) -- Add v to end. -- Do not move cursor. put_left (v: like item) -- Add v to the left of cursor position. -- Do not move cursor. ensure then previous_exists: previous /= void item_inserted: previous.item = v put_right (v: like item) -- Add v to the right of cursor position. -- Do not move cursor. ensure then next_exists: next /= void item_inserted: not old before implies next.item = v item_inserted_before: old before implies active.item = v replace (v: like item) -- Replace current item by v. merge_left (other: like Current) -- Merge other into current structure before cursor -- position. Do not move cursor. Empty other. merge_right (other: like Current) -- Merge other into current structure after cursor -- position. Do not move cursor. Empty other. feature -- Removal remove -- Remove current item. -- Move cursor to right neighbor -- (or after if no right neighbor). remove_left -- Remove item to the left of cursor position. -- Do not move cursor. remove_right -- Remove item to the right of cursor position. -- Do not move cursor. wipe_out -- Remove all items. feature -- Duplication copy (other: like Current) -- Update current object using fields of object attached -- to other, so as to yield equal objects. invariant prunable: prunable empty_constraint: is_empty implies ((first_element = void) and (active = void)) not_void_unless_empty: (active = void) implies is_empty before_constraint: before implies (active = first_element) after_constraint: after implies (active = last_element) indexing library: "[ EiffelBase: Library of reusable components for Eiffel. ]" status: "[ Copyright 1986-2001 Interactive Software Engineering (ISE). For ISE customers the original versions are an ISE product covered by the ISE Eiffel license and support agreements. ]" license: "[ EiffelBase may now be used by anyone as FREE SOFTWARE to develop any product, public-domain or commercial, without payment to ISE, under the terms of the ISE Free Eiffel Library License (IFELL) at http://eiffel.com/products/base/license.html. ]" source: "[ Interactive Software Engineering Inc. ISE Building 360 Storke Road, Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Electronic mail <info@eiffel.com> Customer support http://support.eiffel.com ]" info: "[ For latest info see award-winning pages: http://eiffel.com ]" end -- class LINKED_LIST
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Flat contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com