@Test public void allow_only_root() { Schema<String> schema = Schema.<String>builder().build(); SchemaPathFilter filter = new SchemaPathFilter(schema); assertThat(filter.apply(ROOT)).isTrue(); assertThat(filter.apply(ROOT.property("a"))).isFalse(); }
@Override public boolean apply(PropertyPath input) { return schema.find(input) != null; }
SchemaPathFilter implements Predicate<PropertyPath> { @Override public boolean apply(PropertyPath input) { return schema.find(input) != null; } }
SchemaPathFilter implements Predicate<PropertyPath> { @Override public boolean apply(PropertyPath input) { return schema.find(input) != null; } SchemaPathFilter(Schema<?> schema); }
SchemaPathFilter implements Predicate<PropertyPath> { @Override public boolean apply(PropertyPath input) { return schema.find(input) != null; } SchemaPathFilter(Schema<?> schema); @Override boolean apply(PropertyPath input); }
SchemaPathFilter implements Predicate<PropertyPath> { @Override public boolean apply(PropertyPath input) { return schema.find(input) != null; } SchemaPathFilter(Schema<?> schema); @Override boolean apply(PropertyPath input);  }