code: public static <T> boolean contains(T[] a, T o) {
      for (T item : a) {
        if (item.equals(o)) return true;
      }
      return false;
    }
docs: Returns true iff object o equals (not ==) some element of array a.