generic
    type Domain is private;
    type Ranges is private;
    Number_Of_Buckets : in Positive;
    with function Hash_Of (The_Domain : in Domain) return Positive;
package Map_Simple_Cached_Sequential_Unbounded_Controlled_Iterator is

    type Map is limited private;

    procedure Copy (From_The_Map : in Map; To_The_Map : in out Map);
    procedure Clear (The_Map : in out Map);
    procedure Bind (The_Domain : in Domain;
                    And_The_Range : in Ranges;
                    In_The_Map : in out Map);
    procedure Unbind (The_Domain : in Domain; In_The_Map : in out Map);

    function Is_Equal (Left : in Map; Right : in Map) return Boolean;
    function Extent_Of (The_Map : in Map) return Natural;
    function Is_Empty (The_Map : in Map) return Boolean;
    function Is_Bound
                (The_Domain : in Domain; In_The_Map : in Map) return Boolean;
    function Range_Of
                (The_Domain : in Domain; In_The_Map : in Map) return Ranges;

    generic
        with procedure Process (The_Domain : in Domain;
                                The_Range : in Ranges;
                                Continue : out Boolean);
    procedure Iterate (Over_The_Map : in Map);

    Overflow : exception;
    Domain_Is_Not_Bound : exception;
    Multiple_Binding : exception;

private
    type Cache is
        record
            The_Domain : Domain;
            The_Range : Ranges;
            Is_Bound : Boolean := False;
            Is_Current : Boolean := False;
        end record;
    type Node;
    type Structure is access Node;
    type Items is array (Positive range 1 .. Number_Of_Buckets) of Structure;
    type Map is
        record
            The_Cache : Cache;
            The_Items : Items;
        end record;
end Map_Simple_Cached_Sequential_Unbounded_Controlled_Iterator;