Class CObjectWait
- java.lang.Object
-
- org.catools.common.extensions.wait.CObjectWait
-
- Direct Known Subclasses:
CBooleanWait
,CDateWait
,CFileWait
,CIterableWait
,CMapWait
,CNumberWait
,CStringWait
public class CObjectWait extends java.lang.Object
Object wait class contains all wait method which is related to Object
-
-
Constructor Summary
Constructors Constructor Description CObjectWait()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> boolean
waitEquals(T actual, T expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual and expected value are equal objects.static <T> boolean
waitIsNotNull(T actual, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual value is NOT null.static <T> boolean
waitIsNull(T actual, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual value is NOT null.static <T> boolean
waitNotEquals(T actual, T expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual and expected value are not equal objects.
-
-
-
Method Detail
-
waitEquals
public static <T> boolean waitEquals(T actual, T expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual and expected value are equal objects.- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- return actual value or null if the timeout reached
-
waitNotEquals
public static <T> boolean waitNotEquals(T actual, T expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual and expected value are not equal objects.- Parameters:
actual
- value to compareexpected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- return actual value or null if the timeout reached
-
waitIsNull
public static <T> boolean waitIsNull(T actual, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual value is NOT null.- Parameters:
actual
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- return actual value or null if the timeout reached
-
waitIsNotNull
public static <T> boolean waitIsNotNull(T actual, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till actual value is NOT null.- Parameters:
actual
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- return actual value or null if the timeout reached
-
-