note description: "[ Structures for which there exists a traversal policy that will visit every element exactly once. ]" library: "Free implementation of ELKS library" legal: "See notice at end of class." status: "See notice at end of class." names: traversable, traversing access: cursor contents: generic date: "$Date: 2015-12-17 13:34:17 +0000 (Thu, 17 Dec 2015) $" revision: "$Revision: 98279 $" deferred class interface TRAVERSABLE [G] feature -- Access item: G -- Item at current position require not_off: not off feature -- Status report off: BOOLEAN -- Is there no current item? feature -- Cursor movement start -- Move to first position if any. feature -- Iteration do_all (action: PROCEDURE [G]) -- Apply action to every item. -- Semantics not guaranteed if action changes the structure; -- in such a case, apply iterator to clone of structure instead. require action_exists: action /= Void do_if (action: PROCEDURE [G]; test: FUNCTION [G, BOOLEAN]) -- Apply action to every item that satisfies test. -- Semantics not guaranteed if action or test changes the structure; -- in such a case, apply iterator to clone of structure instead. require action_exists: action /= Void test_exists: test /= Void there_exists (test: FUNCTION [G, BOOLEAN]): BOOLEAN -- Is test true for at least one item? require test_exists: test /= Void for_all (test: FUNCTION [G, BOOLEAN]): BOOLEAN -- Is test true for all items? require test_exists: test /= Void invariant empty_constraint: is_empty implies off 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 TRAVERSABLE
Generated by ISE EiffelStudio