Class QueryMatch.Builder

  • Enclosing class:
    QueryMatch

    public static class QueryMatch.Builder
    extends Object
    Fluent builder that accumulates attributes and evidence for one match.
    • 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 name
        value - 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