public class Collector extends Object
Modifier and Type | Method and Description |
---|---|
static Elements |
collect(Evaluator eval,
Element root)
Build a list of elements, by visiting root and every descendant of root, and testing it against the evaluator.
|
static Element |
findFirst(Evaluator eval,
Element root)
Finds the first Element that matches the Evaluator that descends from the root, and stops the query once that first
match is found.
|
public static Elements collect(Evaluator eval, Element root)
eval
- Evaluator to test elements againstroot
- root of tree to descend@Nullable public static Element findFirst(Evaluator eval, Element root)
eval
- Evaluator to test elements againstroot
- root of tree to descendnull
if noneCopyright © 2009–2022 Jonathan Hedley. All rights reserved.