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 Type
    Method
    Description
    Restricts this selector's targets to a depth that satisfies the given predicate.
  • Method Details

    • atDepth

      Restricts this selector's targets to a depth that satisfies the given predicate.

      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: