Self (final @NotNull T o) { return with(new ValuePatternCondition<T>("equalTo") { @Override public boolean accepts(final @NotNull T t, final ProcessingContext context) { return t.equals(o); } @Override public Collection<T> getValues() { return Collections.singletonList(o); } }); }