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 Type
    Method
    Description
    atDepth(int depth)
    Restricts this selector's targets to the specified depth.
  • Method Details

    • atDepth

      @ExperimentalApi GroupableSelector atDepth(int depth)
      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 using toScope(), the semantics of the Selector.within(Scope...) method still apply, meaning that the selection applies to targets at depth equal to or greater than N.

      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: