public static class Decision.Single extends Decision
Decision.Multi, Decision.Single, Decision.Type
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
ALWAYS, NO, THROTTLE, YES
EMPTY_PARAMS
Constructor and Description |
---|
Decision.Single() |
Decision.Single(Decision.Type type)
Creates a new
Decision.Single decision of a given type |
Decision.Single(Decision.Type type,
String label,
String explanation,
Object... explanationParams)
Creates a new
Decision.Single decision of a given type |
Modifier and Type | Method and Description |
---|---|
String |
getExplanation()
Returns the explanation string, fully formatted.
|
String |
label() |
String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Decision.Type |
type()
Get the
Decision.Type of this decision |
public Decision.Single()
public Decision.Single(Decision.Type type)
Decision.Single
decision of a given typetype
- Decision.Type
of the decisionpublic Decision.Single(Decision.Type type, String label, String explanation, 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 decisionpublic String getExplanation()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
Copyright © 2009–2016. All rights reserved.