+ # Return the index of the first occurence of `item'.
+ # Return -1 if `item' is not found
+ meth index_of(item: E): Int
+ do
+ var i = iterator
+ while i.is_ok do
+ if i.item == item then return i.index
+ i.next
+ end
+ return -1
+ end
+
+ redef meth iterator: IndexedIterator[E] is abstract
+end
+
+# Indexed collection are ordoned collections.
+# The first item is 0. The last is `length'-1.
+interface IndexedCollection[E]
+special IndexedCollectionRead[E]
+special Map[Int, E]
+special SimpleCollection[E]
+ # Set the first item.
+ # Is equivalent with `self'[0] = `item'.
+ meth first=(item: E)
+ do self[0] = item end
+