public static boolean containsAny(Iterable<?> iterable, Object... elements) {
    for (Object curr: iterable) {
      for (Object elem: elements) {
        if (ObjectUtil.equals(curr, elem)) return true;
      }
    }
    return false;
  }
(Partial) replacement for Arrays.copyOfRange, which is only available in JDK6.
spock-core/src/main/java/org/spockframework/util/CollectionUtil.java