public static class Decision.Single extends Decision
Decision.Multi, Decision.Single, Decision.Type
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Writeable.Reader<V>, Writeable.Writer<V>
ALWAYS, NO, THROTTLE, YES
EMPTY_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, single
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public 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 Decision
explanationParams
- A set of additional parameterspublic Decision.Type type()
Decision
Decision.Type
of this decisiontype
in class Decision
Decision.Type
of this decision@Nullable public java.lang.String label()
Decision
public java.util.List<Decision> getDecisions()
Decision
getDecisions
in class Decision
@Nullable public java.lang.String getExplanation()
getExplanation
in class Decision
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
java.io.IOException