Package org.awaitility.core
Class EvaluatedCondition<T>
java.lang.Object
org.awaitility.core.EvaluatedCondition<T>
- Type Parameters:
T- The condition evaluation result value type.
Contains properties of the condition at its current stage.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
description
-
matcher
-
currentConditionValue
-
elapsedTimeInMS
private final long elapsedTimeInMS -
pollInterval
-
remainingTimeInMS
private final long remainingTimeInMS -
conditionIsFulfilled
private final boolean conditionIsFulfilled -
alias
-
-
Constructor Details
-
EvaluatedCondition
EvaluatedCondition(String description, org.hamcrest.Matcher<? super T> matcher, T currentConditionValue, long elapsedTimeInMS, long remainingTimeInMS, boolean isConditionSatisfied, String alias, Duration pollInterval) - Parameters:
description- A descriptive match message or mismatch message of the matcher. IfisConditionSatisfiedistruethen it describes a match message, iffalsethen it describes a mismatch message.matcher- The Hamcrest matcher used in the conditioncurrentConditionValue- The current value of the condition.elapsedTimeInMS- elapsed time in milliseconds.remainingTimeInMS- remaining time to wait in milliseconds;Long.MAX_VALUE, if no timeout defined, i.e., running forever.isConditionSatisfied-trueif the condition is satisfied (i.e. hamcrest matcher matches the value),falseotherwise (i.e. an intermediate value).
-
-
Method Details
-
getDescription
- Returns:
- Descriptive message of the Hamcrest matcher.
-
isHamcrestCondition
public boolean isHamcrestCondition()- Returns:
trueif the condition has a matcher (i.e. it's a Hamcrest Based condition) which means thatgetMatcher()will return a non-null value.
-
getMatcher
- Returns:
- The Hamcrest matcher used in the condition if this condition is a Hamcrest condition
- See Also:
-
getValue
- Returns:
- The current value of the condition.
-
getElapsedTimeInMS
public long getElapsedTimeInMS()- Returns:
- Elapsed time in milliseconds.
-
getRemainingTimeInMS
public long getRemainingTimeInMS()- Returns:
- Remaining time to wait in milliseconds or
Long.MAX_VALUEif no timeout defined, i.e., running forever.
-
isConditionRunningForever
public boolean isConditionRunningForever()- Returns:
trueif the condition doesn't have a timeout,falseotherwise.
-
isSatisfied
public boolean isSatisfied()- Returns:
trueif the condition is satisfied (i.e. hamcrest matcher matches the value),falseotherwise (i.e. an intermediate value).
-
getAlias
- Returns:
- The Awaitility alias for the condition (if any).
- See Also:
-
hasAlias
public boolean hasAlias()- Returns:
trueif this condition defined an alias.- See Also:
-
getPollInterval
- Returns:
- The poll interval for the evaluation round
-