public final class ConditionMessage.Builder
extends java.lang.Object
ConditionMessage for a condition.| Modifier and Type | Method and Description |
|---|---|
ConditionMessage |
available(java.lang.String item)
Indicates something is available.
|
ConditionMessage |
because(java.lang.String reason)
Indicates the reason.
|
ConditionMessage.ItemsBuilder |
didNotFind(java.lang.String article)
Indicate that one or more results were not found.
|
ConditionMessage.ItemsBuilder |
didNotFind(java.lang.String singular,
java.lang.String plural)
Indicate that one or more results were found.
|
ConditionMessage.ItemsBuilder |
found(java.lang.String article)
Indicate that one or more results were found.
|
ConditionMessage.ItemsBuilder |
found(java.lang.String singular,
java.lang.String plural)
Indicate that one or more results were found.
|
ConditionMessage |
foundExactly(java.lang.Object result)
Indicate that an exact result was found.
|
ConditionMessage |
notAvailable(java.lang.String item)
Indicates something is not available.
|
ConditionMessage |
resultedIn(java.lang.Object result)
Indicates a single result.
|
public ConditionMessage foundExactly(java.lang.Object result)
foundExactly("foo") results in the message "found foo".result - the result that was foundConditionMessagepublic ConditionMessage.ItemsBuilder found(java.lang.String article)
found("bean").items("x") results in the message "found bean x".article - the article foundConditionMessage.ItemsBuilderpublic ConditionMessage.ItemsBuilder found(java.lang.String singular, java.lang.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.ItemsBuilderpublic ConditionMessage.ItemsBuilder didNotFind(java.lang.String article)
didNotFind("bean").items("x") results in the message "did not find bean
x".article - the article foundConditionMessage.ItemsBuilderpublic ConditionMessage.ItemsBuilder didNotFind(java.lang.String singular, java.lang.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.ItemsBuilderpublic ConditionMessage resultedIn(java.lang.Object result)
resultedIn("yes") results in the
message "resulted in yes".result - the resultConditionMessagepublic ConditionMessage available(java.lang.String item)
available("money")
results in the message "money is available".item - the item that is availableConditionMessagepublic ConditionMessage notAvailable(java.lang.String item)
notAvailable("time")
results in the message "time is not available".item - the item that is not availableConditionMessagepublic ConditionMessage because(java.lang.String reason)
because("running Linux") results in
the message "running Linux".reason - the reason for the messageConditionMessage