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.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.