code: public static boolean in(Object obj, Object... array) {
      for (Object expected : array) {
        if (obj == expected) {
          return true;
        }
      }
      return false;
    }
docs: Checks whether {@code obj} is one of the elements of {@code array}.