public static class Decision.Single extends Decision
Decision.Multi, Decision.Single, Decision.TypeToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>ALWAYS, NO, THROTTLE, YESEMPTY_PARAMS| Constructor and Description |
|---|
Single() |
Single(Decision.Type type)
Creates a new
Decision.Single decision of a given type |
Single(Decision.Type type,
java.lang.String label,
java.lang.String explanation,
java.lang.Object... explanationParams)
Creates a new
Decision.Single decision of a given type |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object) |
java.util.List<Decision> |
getDecisions()
Return the list of all decisions that make up this decision
|
java.lang.String |
getExplanation()
Returns the explanation string, fully formatted.
|
int |
hashCode() |
java.lang.String |
label()
Get the description label for this decision.
|
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Decision.Type |
type()
Get the
Decision.Type of this decision |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
readFrom, singleclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentpublic Single()
public Single(Decision.Type type)
Decision.Single decision of a given typetype - Decision.Type of the decisionpublic Single(Decision.Type type, @Nullable java.lang.String label, @Nullable java.lang.String explanation, @Nullable java.lang.Object... explanationParams)
Decision.Single decision of a given typetype - Decision.Type of the decisionexplanation - An explanation of this DecisionexplanationParams - A set of additional parameterspublic Decision.Type type()
DecisionDecision.Type of this decisiontype in class DecisionDecision.Type of this decision@Nullable public java.lang.String label()
Decisionpublic java.util.List<Decision> getDecisions()
DecisiongetDecisions in class Decision@Nullable public java.lang.String getExplanation()
getExplanation in class Decisionpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablejava.io.IOException