Class ConditionMessage.Builder
java.lang.Object
org.springframework.boot.autoconfigure.condition.ConditionMessage.Builder
- Enclosing class:
- ConditionMessage
Builder used to create a
ConditionMessage
for a condition.-
Method Summary
Modifier and TypeMethodDescriptionIndicates something is available.Indicates the reason.didNotFind
(String article) Indicate that one or more results were not found.didNotFind
(String singular, String plural) Indicate that one or more results were found.Indicate that one or more results were found.Indicate that one or more results were found.foundExactly
(Object result) Indicate that an exact result was found.notAvailable
(String item) Indicates something is not available.resultedIn
(Object result) Indicates a single result.
-
Method Details
-
foundExactly
Indicate that an exact result was found. For examplefoundExactly("foo")
results in the message "found foo".- Parameters:
result
- the result that was found- Returns:
- a built
ConditionMessage
-
found
Indicate that one or more results were found. For examplefound("bean").items("x")
results in the message "found bean x".- Parameters:
article
- the article found- Returns:
- an
ConditionMessage.ItemsBuilder
-
found
Indicate that one or more results were found. For examplefound("bean", "beans").items("x", "y")
results in the message "found beans x, y".- Parameters:
singular
- the article found in singular formplural
- the article found in plural form- Returns:
- an
ConditionMessage.ItemsBuilder
-
didNotFind
Indicate that one or more results were not found. For exampledidNotFind("bean").items("x")
results in the message "did not find bean x".- Parameters:
article
- the article found- Returns:
- an
ConditionMessage.ItemsBuilder
-
didNotFind
Indicate that one or more results were found. For exampledidNotFind("bean", "beans").items("x", "y")
results in the message "did not find beans x, y".- Parameters:
singular
- the article found in singular formplural
- the article found in plural form- Returns:
- an
ConditionMessage.ItemsBuilder
-
resultedIn
Indicates a single result. For exampleresultedIn("yes")
results in the message "resulted in yes".- Parameters:
result
- the result- Returns:
- a built
ConditionMessage
-
available
Indicates something is available. For exampleavailable("money")
results in the message "money is available".- Parameters:
item
- the item that is available- Returns:
- a built
ConditionMessage
-
notAvailable
Indicates something is not available. For examplenotAvailable("time")
results in the message "time is not available".- Parameters:
item
- the item that is not available- Returns:
- a built
ConditionMessage
-
because
Indicates the reason. For examplebecause("running Linux")
results in the message "running Linux".- Parameters:
reason
- the reason for the message- Returns:
- a built
ConditionMessage
-