Commits

Stepan Koltsov  committed 8dc0eb5

typesafe indexOf

  • Participants
  • Parent commits a50e1fc

Comments (0)

Files changed (2)

File src/main/java/ru/yandex/bolts/collection/ListF.java

     public boolean retainAllTs(Collection<? extends E> c);
     public boolean retainAllTu(Collection<?> c);
 
+    @Override
+    public int indexOf(Object o);
+    public int indexOfTs(E o);
+    public int indexOfTu(Object o);
+
 } //~

File src/main/java/ru/yandex/bolts/collection/impl/AbstractListF.java

      * @param object
      *            the object to search for
      * @return the index of the first occurrence of the object
+     * @deprecated
      */
     public int indexOf(Object object) {
         ListIterator<?> it = listIterator();
         return -1;
     }
 
+    @Override
+    public int indexOfTs(E o) {
+        return indexOf(o);
+    }
+
+    @Override
+    public int indexOfTu(Object o) {
+        return indexOf(o);
+    }
+
     /**
      * Answers an Iterator on the elements of this List. The elements are
      * iterated in the same order that they occur in the List.