Package com.tonic.analysis.query.planner
Class QueryMatch.Builder
- java.lang.Object
-
- com.tonic.analysis.query.planner.QueryMatch.Builder
-
- Enclosing class:
- QueryMatch
public static class QueryMatch.Builder extends Object
Fluent builder that accumulates attributes and evidence for one match.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryMatch.Builderattribute(String name, Object value)Adds one attribute, replacing any previous value under the same name.QueryMatchbuild()QueryMatch.Builderevidence(List<QueryMatch> evidence)Sets the nested matches that back this one.
-
-
-
Method Detail
-
attribute
public QueryMatch.Builder attribute(String name, Object value)
Adds one attribute, replacing any previous value under the same name.- Parameters:
name- the attribute namevalue- the attribute value- Returns:
- this builder
-
evidence
public QueryMatch.Builder evidence(List<QueryMatch> evidence)
Sets the nested matches that back this one.- Parameters:
evidence- the evidence matches, replacing the current list- Returns:
- this builder
-
build
public QueryMatch build()
- Returns:
- a match holding the accumulated target, attributes and evidence
-
-