filter
Returns a collection of the matches that also satisfy matcher. Like every interaction, the returned handle re-resolves against the live tree on each use, so it tracks recomposition.
Composing a structural matcher scopes a tree-wide query to one subtree:
onAllNodesOfType<JLabel>().filter(SwingMatcher.hasAnyAncestor(SwingMatcher.hasTestTag("editor")))Content copied to clipboard
Return
a handle to the narrowed match set, empty rather than failing when nothing survives.
Parameters
matcher
narrows the match set, keeping the order the tree yields its matches in.