/** * Create a new {@link PathPropertySetAdapter}. * @param propertySet The property set to use (not null) * @return A new {@link PathPropertySetAdapter} */ static PathPropertySetAdapter create(PropertySet<?> propertySet) { return builder(propertySet).build(); }
public void pathPropertySetAdapter1() { // tag::ppsa1[] final StringProperty STR = StringProperty.create("str"); final NumericProperty<Integer> ITG = NumericProperty.integerType("itg"); final PropertySet<?> SET = PropertySet.of(STR, ITG); final Path<String> PATH = Path.of("str", String.class); PathPropertySetAdapter adapter = PathPropertySetAdapter.create(SET); // <1> boolean contains = adapter.contains(PATH); // <2> Optional<Property<String>> property = adapter.getProperty(PATH); // <3> Optional<Path<String>> path = adapter.getPath(STR); // <4> Stream<Path<?>> paths = adapter.paths(); // <5> // end::ppsa1[] // tag::ppsa2[] PathPropertySetAdapter pathPropertySetAdapter = PathPropertySetAdapter.builder(SET) // <1> .pathConverter(new MyPathConverter()) // <2> .pathMatcher(new MyPathMatcher()) // <3> .build(); // end::ppsa2[] }