public final class Explanation
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
A description of this explanation node.
|
Explanation[] |
getDetails()
The sub-nodes of this explanation node.
|
float |
getValue()
The value assigned to this explanation node.
|
boolean |
isMatch()
Indicates whether or not this Explanation models a match.
|
static Explanation |
match(float value,
java.lang.String description,
java.util.Collection<Explanation> details)
Create a new explanation for a match.
|
static Explanation |
match(float value,
java.lang.String description,
Explanation... details)
Create a new explanation for a match.
|
static Explanation |
noMatch(java.lang.String description,
java.util.Collection<Explanation> details)
Create a new explanation for a document which does not match.
|
static Explanation |
noMatch(java.lang.String description,
Explanation... details)
Create a new explanation for a document which does not match.
|
java.lang.String |
toHtml()
Render an explanation as HTML.
|
java.lang.String |
toString()
Render an explanation as text.
|
public static Explanation match(float value, java.lang.String description, java.util.Collection<Explanation> details)
value - the contribution to the score of the documentdescription - how value was computeddetails - sub explanations that contributed to this explanationpublic static Explanation match(float value, java.lang.String description, Explanation... details)
value - the contribution to the score of the documentdescription - how value was computeddetails - sub explanations that contributed to this explanationpublic static Explanation noMatch(java.lang.String description, java.util.Collection<Explanation> details)
public static Explanation noMatch(java.lang.String description, Explanation... details)
public boolean isMatch()
public float getValue()
public java.lang.String getDescription()
public Explanation[] getDetails()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toHtml()
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.