Class Collector
- java.lang.Object
-
- com.itextpdf.styledxmlparser.jsoup.select.Collector
-
public class Collector extends java.lang.ObjectCollects a list of elements that match the supplied criteria.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCollector.Accumulatorprivate static classCollector.FirstFinder
-
Constructor Summary
Constructors Modifier Constructor Description privateCollector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Elementscollect(Evaluator eval, Element root)Build a list of elements, by visiting root and every descendant of root, and testing it against the evaluator.static ElementfindFirst(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.
-
-
-
Method Detail
-
collect
public 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.- Parameters:
eval- Evaluator to test elements againstroot- root of tree to descend- Returns:
- list of matches; empty if none
-
findFirst
public 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.- Parameters:
eval- Evaluator to test elements againstroot- root of tree to descend- Returns:
- the first match;
nullif none
-
-