public final class Explanation
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
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.
|
int |
hashCode() |
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 |
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 boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.