public class ConditionOutcome extends Object
ConditionMessage| Constructor and Description |
|---|
ConditionOutcome(boolean match,
ConditionMessage message)
Create a new
ConditionOutcome instance. |
ConditionOutcome(boolean match,
String message)
Create a new
ConditionOutcome instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ConditionMessage |
getConditionMessage()
Return an outcome message or
null. |
String |
getMessage()
Return an outcome message or
null. |
int |
hashCode() |
static ConditionOutcome |
inverse(ConditionOutcome outcome)
Return the inverse of the specified condition outcome.
|
boolean |
isMatch()
Return
true if the outcome was a match. |
static ConditionOutcome |
match()
Create a new
ConditionOutcome instance for a 'match'. |
static ConditionOutcome |
match(ConditionMessage message)
Create a new
ConditionOutcome instance for 'match'. |
static ConditionOutcome |
match(String message)
Create a new
ConditionOutcome instance for 'match'. |
static ConditionOutcome |
noMatch(ConditionMessage message)
Create a new
ConditionOutcome instance for 'no match'. |
static ConditionOutcome |
noMatch(String message)
Create a new
ConditionOutcome instance for 'no match'. |
String |
toString() |
public ConditionOutcome(boolean match,
String message)
ConditionOutcome instance. For more consistent messages
consider using ConditionOutcome(boolean, ConditionMessage).match - if the condition is a matchmessage - the condition messagepublic ConditionOutcome(boolean match,
ConditionMessage message)
ConditionOutcome instance.match - if the condition is a matchmessage - the condition messagepublic static ConditionOutcome match()
ConditionOutcome instance for a 'match'.ConditionOutcomepublic static ConditionOutcome match(String message)
ConditionOutcome instance for 'match'. For more consistent
messages consider using match(ConditionMessage).message - the messageConditionOutcomepublic static ConditionOutcome match(ConditionMessage message)
ConditionOutcome instance for 'match'.message - the messageConditionOutcomepublic static ConditionOutcome noMatch(String message)
ConditionOutcome instance for 'no match'. For more consistent
messages consider using noMatch(ConditionMessage).message - the messageConditionOutcomepublic static ConditionOutcome noMatch(ConditionMessage message)
ConditionOutcome instance for 'no match'.message - the messageConditionOutcomepublic boolean isMatch()
true if the outcome was a match.true if the outcome matchespublic String getMessage()
null.nullpublic ConditionMessage getConditionMessage()
null.nullpublic static ConditionOutcome inverse(ConditionOutcome outcome)
outcome - the outcome to inverseCopyright © 2019 Pivotal Software, Inc.. All rights reserved.