@Test public void leavesShapesAlone() { ShapeId aId = ShapeId.from("ns.foo#A"); StringShape a = StringShape.builder().id(aId).build(); Model model = Model.builder().addShape(a).build(); ModelTransformer transformer = ModelTransformer.create(); Model result = transformer.filterTraits(model, (shape, trait) -> true); assertThat(result.shapes().count(), Matchers.is(1L)); }
FilterTraits(BiPredicate<Shape, Trait> predicate) { this.predicate = predicate; }
FilterTraits { FilterTraits(BiPredicate<Shape, Trait> predicate) { this.predicate = predicate; } }
FilterTraits { FilterTraits(BiPredicate<Shape, Trait> predicate) { this.predicate = predicate; } FilterTraits(BiPredicate<Shape, Trait> predicate); }
FilterTraits { FilterTraits(BiPredicate<Shape, Trait> predicate) { this.predicate = predicate; } FilterTraits(BiPredicate<Shape, Trait> predicate);  }
FilterTraits { FilterTraits(BiPredicate<Shape, Trait> predicate) { this.predicate = predicate; } FilterTraits(BiPredicate<Shape, Trait> predicate);   }