Automatic generation produced by ISE Eiffel
note description: "Unbounded queues, implemented by resizable arrays" library: "Free implementation of ELKS library" legal: "See notice at end of class." status: "See notice at end of class." names: dispenser, array representation: array access: fixed, fifo, membership size: fixed contents: generic date: "$Date: 2015-08-18 22:52:35 -0700 (Tue, 18 Aug 2015) $" revision: "$Revision: 97844 $" class interface ARRAYED_QUEUE [G] create make feature -- Initialization make (n: INTEGER_32) -- Create queue for at most `n' items. require non_negative_argument: n >= 0 ensure capacity_expected: capacity = n is_empty: is_empty feature -- Access item: G -- Oldest item. has (v: like item): BOOLEAN -- Does queue include `v'? -- (Reference or object equality, -- based on object_comparison.) feature -- Comparison is_equal (other: like Current): BOOLEAN -- Is `other' attached to an object considered -- equal to current object? feature -- Measurement count: INTEGER_32 -- Number of items capacity: INTEGER_32 -- Number of items that may be stored occurrences (v: G): INTEGER_32 -- Number of times `v' appears in structure -- (Reference or object equality, -- based on object_comparison.) index_set: INTEGER_INTERVAL -- Range of acceptable indexes ensure then count_definition: Result.count = count feature -- Status report is_empty: BOOLEAN -- Is the structure empty? -- Was declared in ARRAYED_QUEUE as synonym of off. off: BOOLEAN -- Is the structure empty? -- Was declared in ARRAYED_QUEUE as synonym of is_empty. extendible: BOOLEAN -- May items be added? (Answer: yes.) prunable: BOOLEAN -- May items be removed? (Answer: no.) feature -- Element change extend (v: G) -- Add `v' as newest item. -- Was declared in ARRAYED_QUEUE as synonym of put and force. put (v: G) -- Add `v' as newest item. -- Was declared in ARRAYED_QUEUE as synonym of extend and force. force (v: G) -- Add `v' as newest item. -- Was declared in ARRAYED_QUEUE as synonym of extend and put. replace (v: like item) -- Replace oldest item by `v'. feature -- Duplication copy (other: like Current) -- Update current object using fields of object attached -- to `other', so as to yield equal objects. feature -- Removal remove -- Remove oldest item. require else writable: writable prune (v: G) -- Remove one occurrence of `v' if any. -- (Reference or object equality, -- based on object_comparison.) prune_all (v: G) -- Remove all occurrences of `v'. -- (Reference or object equality, -- based on object_comparison.) wipe_out -- Remove all items. require else prunable: True feature -- Resizing trim -- Decrease capacity to the minimum value. -- Apply to reduce allocated storage. ensure then same_items: linear_representation ~ old linear_representation feature -- Conversion linear_representation: ARRAYED_LIST [G] -- Representation as a linear structure -- (in the original insertion order) note copyright: "Copyright (c) 1984-2015, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class ARRAYED_QUEUE -- Generated by ISE Eiffel --
For more details: www.eiffel.com