@Test public void inversion() throws Exception { ValueFilter filter = Configs.decodeObject(ValueFilter.class, "not.glob = \"foo*\""); assertNull(filter.filter(create("foobar"))); assertNotNull(filter.filter(create("notfoo"))); assertNotNull(filter.filter(create("goodbar"))); }
@Override @Nullable public ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context) { if (filter.filter(value, context) == null) { return value; } else { return null; } }
ValueFilterNot extends AbstractValueFilterContextual { @Override @Nullable public ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context) { if (filter.filter(value, context) == null) { return value; } else { return null; } } }
ValueFilterNot extends AbstractValueFilterContextual { @Override @Nullable public ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context) { if (filter.filter(value, context) == null) { return value; } else { return null; } } @JsonCreator  ValueFilterNot(ValueFilter filter); }
ValueFilterNot extends AbstractValueFilterContextual { @Override @Nullable public ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context) { if (filter.filter(value, context) == null) { return value; } else { return null; } } @JsonCreator  ValueFilterNot(ValueFilter filter); @Override @Nullable ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context); @Nullable @Override ValueObject filterValue(@Nullable ValueObject value, @Nullable Bundle context); }
ValueFilterNot extends AbstractValueFilterContextual { @Override @Nullable public ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context) { if (filter.filter(value, context) == null) { return value; } else { return null; } } @JsonCreator  ValueFilterNot(ValueFilter filter); @Override @Nullable ValueObject filter(@Nullable ValueObject value, @Nullable Bundle context); @Nullable @Override ValueObject filterValue(@Nullable ValueObject value, @Nullable Bundle context);  }