code: public static <T> boolean containsObject(Collection<T> c, T o) {
      for (Object o1 : c) {
        if (o == o1) {
          return true;
        }
      }
      return false;
    }
docs: Checks whether a Collection contains a specified Object. Object equality
  (==), rather than .equals(), is used.