deferred class interface P_SEQUENCE[G]

feature(s) from P_CONTAINER
   --  Status

   count: INTEGER
      --  Number of items in the container.

      ensure
         positive: Result >= 0

   is_empty: BOOLEAN
      --  Is the container empty?


   is_readable: BOOLEAN
      --  Is the container currently readable?


   is_writable: BOOLEAN
      --  Is the container currently writable?


   item: G
      --  Current item.

      require
         readable: is_readable;
         not_empty: not is_empty

feature(s) from P_CONTAINER
   --  Update

   reset
      --  Remove all objects from the container.

      require
         writable: is_writable
      ensure
         done: is_empty

feature(s) from P_CONTAINER
   --  Output

   out: STRING
      --  String representation.

      ensure
         is_copy:  --  new string

feature(s) from P_CONTAINER
   --  Utility

   is_void (x: ANY): BOOLEAN
      --  Void assertion for generic parameters.


feature(s) from P_SEQUENCE
   --  Update

   set_index (idx: INTEGER)
      --  Set the current item to the one at position 'idx'.

      require
         not_empty: not is_empty;
         index_low: idx >= 1;
         index_up: idx <= count

feature(s) from P_SEQUENCE
   --  Status

   index: INTEGER
      require
         not_empty: not is_empty
      ensure
         valid: Result >= 1 and Result <= count

invariant
   empty: is_empty = count = 0;

end of deferred P_SEQUENCE[G]