CollectionPattern<T> (final ElementPattern<? extends T> pattern) { return with(new PatternCondition<Collection<T>>("atLeastOne") { @Override public boolean accepts(final @NotNull Collection<T> collection, final ProcessingContext context) { for (final T t : collection) { if (pattern.accepts(t, context)) return true; } return false; } }); }