Package org.instancio
Interface DepthSelector
- All Known Subinterfaces:
FieldSelectorBuilder,PredicateSelector,Selector,TypeSelectorBuilder
public interface DepthSelector
Interface for specifying the depth of a selector's target.
- Since:
- 2.14.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionatDepth(int depth) Restricts this selector's targets to the specified depth.
-
Method Details
-
atDepth
Restricts this selector's targets to the specified depth. The selector will only apply to targets at the specified depth.When a selector with
atDepth(N)is converted usingtoScope(), the semantics of theSelector.within(Scope...)method still apply, meaning that the selection applies to targets at depth equal to or greater thanN.The root object is considered to be at depth 0.
- Parameters:
depth- the depth at which the selector should apply- Returns:
- a selector restricted to the specified depth
- Since:
- 2.14.0
- See Also:
-