note
	description: "[
		Not immutable yet.
		Implemented with SORTED_TWO_WAY_LIST
	]"
	author: "JSO and JW"
	date: "$Date$"
	revision: "$Revision$"

class interface
	UTIL_PRIORITY_QUEUE [G -> COMPARABLE]

create 
	make_empty,
	make_one,
	make_from_array

convert
	make_from_array ({ARRAY [G]})

feature -- queries

	minimum: G
			-- element at the front
		require
				not is_empty

	maximum: 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 queue in comparable order
		ensure
				count = old count + 1
				has (g)

	dequeue
			-- remove minimum from 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 UTIL_PRIORITY_QUEUE

Generated by ISE EiffelStudio