code: public static <T> int getIndex(List<T> l, T o) {
      int i = 0;
      for (Object o1 : l) {
        if (o == o1)
          return i;
        else
          i++;
      }
      return -1;
    }
docs: Returns the index of the first occurrence in the list of the specified
  object, using object identity (==) not equality as the criterion for object
  presence. If this list does not contain the element, return -1.
  
  @param l
  The {@link List} to find the object in.
  @param o
  The sought-after object.
  @return Whether or not the List was changed.