note description: "Summary description for {MY_PRIORITY_QUEUE}." author: "JSO and JW" date: "$Date$" revision: "$Revision$" class interface MY_PRIORITY_QUEUE [G -> COMPARABLE] create make_empty, make_one, make_from_array convert make_from_array ({ARRAY [G]}) feature -- queries first: G -- element at the front of the queue require not is_empty last: G -- element at the back of the queue is_empty: BOOLEAN -- is queue empty? count: INTEGER_32 -- number of elements in the queue is_equal (other: like Current): BOOLEAN -- is this queue equal to other has (g: G): BOOLEAN -- does this queue have element g feature -- commands enqueue (g: G) -- add element g to the rear of the queue ensure count = old count + 1 has (g) dequeue -- remove element first at the front of the queue ensure count = old count - 1 prune (g: G) -- Remove first occurrence of v, if any. feature -- out out: STRING_8 -- New string containing terse printable representation -- of current object debug_output: STRING_8 -- String that should be displayed in debugger to represent Current. end -- class MY_PRIORITY_QUEUE
Generated by ISE EiffelStudio