类 ConditionMessage.Builder
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.ConditionMessage.Builder
- 封闭类:
- ConditionMessage
public final class ConditionMessage.Builder extends Object
Builder used to create aConditionMessagefor a condition.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ConditionMessageavailable(String item)Indicates something is available.ConditionMessagebecause(String reason)Indicates the reason.ConditionMessage.ItemsBuilderdidNotFind(String article)Indicate that one or more results were not found.ConditionMessage.ItemsBuilderdidNotFind(String singular, String plural)Indicate that one or more results were found.ConditionMessage.ItemsBuilderfound(String article)Indicate that one or more results were found.ConditionMessage.ItemsBuilderfound(String singular, String plural)Indicate that one or more results were found.ConditionMessagefoundExactly(Object result)Indicate that an exact result was found.ConditionMessagenotAvailable(String item)Indicates something is not available.ConditionMessageresultedIn(Object result)Indicates a single result.
方法详细资料
foundExactly
public ConditionMessage foundExactly(Object result)
Indicate that an exact result was found. For examplefoundExactly("foo")results in the message "found foo".- 参数:
result- the result that was found- 返回:
- a built
ConditionMessage
found
public ConditionMessage.ItemsBuilder found(String article)
Indicate that one or more results were found. For examplefound("bean").items("x")results in the message "found bean x".- 参数:
article- the article found- 返回:
- an
ConditionMessage.ItemsBuilder
found
public ConditionMessage.ItemsBuilder found(String singular, String plural)
Indicate that one or more results were found. For examplefound("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 form- 返回:
- an
ConditionMessage.ItemsBuilder
didNotFind
public ConditionMessage.ItemsBuilder didNotFind(String article)
Indicate that one or more results were not found. For exampledidNotFind("bean").items("x")results in the message "did not find bean x".- 参数:
article- the article found- 返回:
- an
ConditionMessage.ItemsBuilder
didNotFind
public ConditionMessage.ItemsBuilder didNotFind(String singular, String plural)
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".- 参数:
singular- the article found in singular formplural- the article found in plural form- 返回:
- an
ConditionMessage.ItemsBuilder
resultedIn
public ConditionMessage resultedIn(Object result)
Indicates a single result. For exampleresultedIn("yes")results in the message "resulted in yes".- 参数:
result- the result- 返回:
- a built
ConditionMessage
available
public ConditionMessage available(String item)
Indicates something is available. For exampleavailable("money")results in the message "money is available".- 参数:
item- the item that is available- 返回:
- a built
ConditionMessage
notAvailable
public ConditionMessage notAvailable(String item)
Indicates something is not available. For examplenotAvailable("time")results in the message "time is not available".- 参数:
item- the item that is not available- 返回:
- a built
ConditionMessage
because
public ConditionMessage because(String reason)
Indicates the reason. For examplereason("running Linux")results in the message "running Linux".- 参数:
reason- the reason for the message- 返回:
- a built
ConditionMessage