Package org.instancio
Interface DepthPredicateSelector
- All Known Subinterfaces:
FieldSelectorBuilder,PredicateSelector,TypeSelectorBuilder
public interface DepthPredicateSelector
Interface for specifying the depth of a selector's
target using a predicate.
- Since:
- 2.14.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRestricts this selector's targets to a depth that satisfies the givenpredicate.
-
Method Details
-
atDepth
Restricts this selector's targets to a depth that satisfies the givenpredicate.For example, a predicate
atDepth(depth -> depth == 1)will restrict the selector to targets at depth 1 only.The root object is considered to be at depth 0.
- Parameters:
predicate- the predicate specifying the acceptable depth- Returns:
- a selector restricted to the specified depth
- Since:
- 2.14.0
- See Also:
-