/** * Set the paths to be used for operation values using a {@link PropertySet}. * <p> * Each property of the property set which corresponds to a {@link Path} will be used as operation path. * </p> * @param propertySet The property set to set (not null) */ public void setOperationPaths(PropertySet<?> propertySet) { ObjectUtils.argumentNotNull(propertySet, "Operation path property set must be not nulll"); setOperationPaths(PathPropertySetAdapter.create(propertySet).paths().collect(Collectors.toList()) .toArray(new Path<?>[0])); }
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[] }