public final class ConditionMessage.Builder extends Object
ConditionMessage
for a condition.Modifier and Type | Method and Description |
---|---|
ConditionMessage |
available(String item)
Indicates something is available.
|
ConditionMessage |
because(String reason)
Indicates the reason.
|
ConditionMessage.ItemsBuilder |
didNotFind(String article)
Indicate that one or more results were not found.
|
ConditionMessage.ItemsBuilder |
didNotFind(String singular,
String plural)
Indicate that one or more results were found.
|
ConditionMessage.ItemsBuilder |
found(String article)
Indicate that one or more results were found.
|
ConditionMessage.ItemsBuilder |
found(String singular,
String plural)
Indicate that one or more results were found.
|
ConditionMessage |
foundExactly(Object result)
Indicate that an exact result was found.
|
ConditionMessage |
notAvailable(String item)
Indicates something is not available.
|
ConditionMessage |
resultedIn(Object result)
Indicates a single result.
|
public ConditionMessage foundExactly(Object result)
foundExactly("foo")
results in the message "found foo".result
- the result that was foundConditionMessage
public ConditionMessage.ItemsBuilder found(String article)
found("bean").items("x")
results in the message "found bean x".article
- the article foundConditionMessage.ItemsBuilder
public ConditionMessage.ItemsBuilder found(String singular, String plural)
found("bean", "beans").items("x", "y")
results in the message "found
beans x, y".singular
- the article found in singular formplural
- the article found in plural formConditionMessage.ItemsBuilder
public ConditionMessage.ItemsBuilder didNotFind(String article)
didNotFind("bean").items("x")
results in the message "did not find bean
x".article
- the article foundConditionMessage.ItemsBuilder
public ConditionMessage.ItemsBuilder didNotFind(String singular, String plural)
didNotFind("bean", "beans").items("x", "y")
results in the message "did
not find beans x, y".singular
- the article found in singular formplural
- the article found in plural formConditionMessage.ItemsBuilder
public ConditionMessage resultedIn(Object result)
resultedIn("yes")
results in the
message "resulted in yes".result
- the resultConditionMessage
public ConditionMessage available(String item)
available("money")
results in the message "money is available".item
- the item that is availableConditionMessage
public ConditionMessage notAvailable(String item)
notAvailable("time")
results in the message "time is not available".item
- the item that is not availableConditionMessage
public ConditionMessage because(String reason)
reason("running Linux")
results in
the message "running Linux".reason
- the reason for the messageConditionMessage
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.