@API(status=STABLE,
since="5.0")
public class ConditionEvaluationResult
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled |
private java.util.Optional<java.lang.String> |
reason |
Modifier | Constructor and Description |
---|---|
private |
ConditionEvaluationResult(boolean enabled,
java.lang.String reason) |
Modifier and Type | Method and Description |
---|---|
static ConditionEvaluationResult |
disabled(java.lang.String reason)
Factory for creating disabled results.
|
static ConditionEvaluationResult |
enabled(java.lang.String reason)
Factory for creating enabled results.
|
java.util.Optional<java.lang.String> |
getReason()
Get the reason why the container or test should be enabled or disabled,
if available.
|
boolean |
isDisabled()
Whether the container or test should be disabled.
|
java.lang.String |
toString() |
private final boolean enabled
private final java.util.Optional<java.lang.String> reason
private ConditionEvaluationResult(boolean enabled, java.lang.String reason)
public static ConditionEvaluationResult enabled(java.lang.String reason)
reason
- the reason why the container or test should be enabledConditionEvaluationResult
with the given reasonpublic static ConditionEvaluationResult disabled(java.lang.String reason)
reason
- the reason why the container or test should be disabledConditionEvaluationResult
with the given reasonpublic boolean isDisabled()
true
if the container or test should be disabledpublic java.util.Optional<java.lang.String> getReason()
public java.lang.String toString()
toString
in class java.lang.Object