类 ConditionOutcome
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.ConditionOutcome
public class ConditionOutcome extends Object
Outcome for a condition match, including log message.- 另请参阅:
ConditionMessage
构造器概要
构造器 构造器 说明 ConditionOutcome(boolean match, String message)Create a newConditionOutcomeinstance.ConditionOutcome(boolean match, ConditionMessage message)Create a newConditionOutcomeinstance.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object obj)ConditionMessagegetConditionMessage()Return an outcome message ornull.StringgetMessage()Return an outcome message ornull.inthashCode()static ConditionOutcomeinverse(ConditionOutcome outcome)Return the inverse of the specified condition outcome.booleanisMatch()Returntrueif the outcome was a match.static ConditionOutcomematch()Create a newConditionOutcomeinstance for a 'match'.static ConditionOutcomematch(String message)Create a newConditionOutcomeinstance for 'match'.static ConditionOutcomematch(ConditionMessage message)Create a newConditionOutcomeinstance for 'match'.static ConditionOutcomenoMatch(String message)Create a newConditionOutcomeinstance for 'no match'.static ConditionOutcomenoMatch(ConditionMessage message)Create a newConditionOutcomeinstance for 'no match'.StringtoString()
构造器详细资料
ConditionOutcome
public ConditionOutcome(boolean match, String message)
Create a newConditionOutcomeinstance. For more consistent messages consider usingConditionOutcome(boolean, ConditionMessage).- 参数:
match- if the condition is a matchmessage- the condition message
ConditionOutcome
public ConditionOutcome(boolean match, ConditionMessage message)
Create a newConditionOutcomeinstance.- 参数:
match- if the condition is a matchmessage- the condition message
方法详细资料
match
public static ConditionOutcome match()
Create a newConditionOutcomeinstance for a 'match'.- 返回:
- the
ConditionOutcome
match
public static ConditionOutcome match(String message)
Create a newConditionOutcomeinstance for 'match'. For more consistent messages consider usingmatch(ConditionMessage).- 参数:
message- the message- 返回:
- the
ConditionOutcome
match
public static ConditionOutcome match(ConditionMessage message)
Create a newConditionOutcomeinstance for 'match'.- 参数:
message- the message- 返回:
- the
ConditionOutcome
noMatch
public static ConditionOutcome noMatch(String message)
Create a newConditionOutcomeinstance for 'no match'. For more consistent messages consider usingnoMatch(ConditionMessage).- 参数:
message- the message- 返回:
- the
ConditionOutcome
noMatch
public static ConditionOutcome noMatch(ConditionMessage message)
Create a newConditionOutcomeinstance for 'no match'.- 参数:
message- the message- 返回:
- the
ConditionOutcome
isMatch
public boolean isMatch()
Returntrueif the outcome was a match.- 返回:
trueif the outcome matches
getMessage
public String getMessage()
Return an outcome message ornull.- 返回:
- the message or
null
getConditionMessage
public ConditionMessage getConditionMessage()
Return an outcome message ornull.- 返回:
- the message or
null
inverse
public static ConditionOutcome inverse(ConditionOutcome outcome)
Return the inverse of the specified condition outcome.- 参数:
outcome- the outcome to inverse- 返回:
- the inverse of the condition outcome
- 从以下版本开始:
- 1.3.0