java.lang.Object
org.jooq.Traversers
A set of
Traverser
constructor methods.
This API is EXPERIMENTAL. Use at your own risk.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,
R> Traverser<?, R> collecting
(Collector<QueryPart, T, R> collector) A traverser constructed from aCollector
.static @NotNull Traverser<?,
?> A traverser that traverses theQueryPart
tree without producing any results.containing
(Predicate<? super QueryPart> predicate) containing
(QueryPart part) findingAll
(Predicate<? super QueryPart> predicate) findingAny
(Predicate<? super QueryPart> predicate) static <A,
R> Traverser<?, R> Combine a recursion test predicate with an existingTraverser
.static <A,
R> Traverser<?, R> recursingChildren
(Predicate<? super QueryPart> recurseChildren, Traverser<A, R> downstream) Combine a recursion test predicate with an existingTraverser
.
-
Method Details
-
recursing
public static <A,R> Traverser<?,R> recursing(Predicate<? super QueryPart> recurse, Traverser<A, R> downstream) Combine a recursion test predicate with an existingTraverser
.Both the provided predicate and the downstream's
Traverser.recurse()
must yield true. -
recursingChildren
public static <A,R> Traverser<?,R> recursingChildren(Predicate<? super QueryPart> recurseChildren, Traverser<A, R> downstream) Combine a recursion test predicate with an existingTraverser
.Both the provided predicate and the downstream's
Traverser.recurseChildren()
must yield true. -
collecting
A traverser constructed from aCollector
. -
containing
- Parameters:
part
- The part to find within the traversedQueryPart
tree.
-
containing
@NotNull public static @NotNull Traverser<?,Boolean> containing(Predicate<? super QueryPart> predicate) - Parameters:
predicate
- The predicate to use to check the traversed tree for aQueryPart
to find.
-
findingAny
@NotNull public static @NotNull Traverser<?,Optional<QueryPart>> findingAny(Predicate<? super QueryPart> predicate) A traverser that finds anyQueryPart
that satisfies a predicate within the traversedQueryPart
tree.- Parameters:
predicate
- The predicate to use to check the traversed tree for aQueryPart
to find.
-
findingAll
@NotNull public static @NotNull Traverser<?,List<QueryPart>> findingAll(Predicate<? super QueryPart> predicate) - Parameters:
predicate
- The predicate to use to check the traversed tree forQueryPart
s to find.
-
consuming
A traverser that traverses theQueryPart
tree without producing any results.This is useful for side effectful traversers, e.g. assertions throwing exceptions, etc.
-