note
	description: "[
		Sequential lists whose items are sorted in ascending order
		according to the relational operators of PART_COMPARABLE
	]"
	library: "Free implementation of ELKS library"
	legal: "See notice at end of class."
	status: "See notice at end of class."
	names: sorted_list, sorted_struct, sequence
	access: index, cursor, membership, min, max
	contents: generic
	date: "$Date: 2012-07-23 21:02:19 +0000 (Mon, 23 Jul 2012) $"
	revision: "$Revision: 91989 $"

deferred class interface
	PART_SORTED_LIST [G -> PART_COMPARABLE]

feature -- Access

	has (v: G): BOOLEAN
			-- Does structure include v?
			-- (Reference or object equality,
			-- based on object_comparison.)

	search_after (v: like item)
			-- Go to first position with item greater
			-- than or equal to v.
		ensure
			argument_less_than_item: (not after) implies (v <= item)

	search_before (v: like item)
			-- Go to last position with item less
			-- than or equal to v.
		ensure
				(not off) implies (item <= v)
	
feature -- Element change

	extend (v: like item)
			-- Put v at proper position in list.
			-- The cursor ends up on the newly inserted
			-- item.
		ensure then
			remains_sorted: (old sorted) implies sorted
			item_inserted: item = v

	merge (other: LINEAR [G])
			-- Add all items from other at their proper positions.
		ensure then
			remains_sorted: (old sorted) implies sorted
	
feature -- Status report

	sorted: BOOLEAN
	
note
	copyright: "Copyright (c) 1984-2012, 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 PART_SORTED_LIST

Generated by ISE EiffelStudio