Interface CIterableWaiter<E>
-
- All Superinterfaces:
CBaseState<java.lang.Iterable<E>>
,CBaseWaiter<java.lang.Iterable<E>>
,CObjectWaiter<java.lang.Iterable<E>>
,java.io.Serializable
- All Known Subinterfaces:
CCollectionWaiter<E>
,CDynamicCollectionExtension<E>
,CDynamicIterableExtension<E>
,CStaticCollectionExtension<E>
,CStaticIterableExtension<E>
public interface CIterableWaiter<E> extends CObjectWaiter<java.lang.Iterable<E>>
CIterableWaiter is an interface for Iterable waiter related methods.
-
-
Field Summary
-
Fields inherited from interface org.catools.common.extensions.states.interfaces.CBaseState
serialVersionUID
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
waitContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains the expected element.default boolean
waitContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains the expected element.default boolean
waitContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains the expected element.default boolean
waitContainsAll(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains all elements from the expected collection.default boolean
waitContainsAll(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains all elements from the expected collection.default boolean
waitContainsAll(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains all elements from the expected collection.default boolean
waitContainsNone(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains none of elements from the expected collection.default boolean
waitContainsNone(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains none of elements from the expected collection.default boolean
waitContainsNone(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains none of elements from the expected collection.default boolean
waitEmptyOrContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection either is empty or contains the expected element.default boolean
waitEmptyOrContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection either is empty or contains the expected element.default boolean
waitEmptyOrContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection either is empty or contains the expected element.default boolean
waitEmptyOrNotContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection either is empty or does not contain the expected element.default boolean
waitEmptyOrNotContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection either is empty or does not contain the expected element.default boolean
waitEmptyOrNotContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection either is empty or does not contain the expected element.default boolean
waitEquals(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual and expected collections have the exact same elements.default boolean
waitEquals(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual and expected collections have the exact same elements.default boolean
waitEquals(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual and expected collections have the exact same elements.default boolean
waitHas(java.util.function.Predicate<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection has the expected predicate.default boolean
waitHas(java.util.function.Predicate<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains the expected predicate.default boolean
waitHas(java.util.function.Predicate<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains the expected predicate.default boolean
waitIsEmpty()
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection is empty.default boolean
waitIsEmpty(int waitInSeconds)
Wait for defined number of seconds till the actual collection is empty.default boolean
waitIsEmpty(int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection is empty.default boolean
waitIsNotEmpty()
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection is not empty.default boolean
waitIsNotEmpty(int waitInSeconds)
Wait for defined number of seconds till the actual collection is not empty.default boolean
waitIsNotEmpty(int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection is not empty.default boolean
waitNotContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection does not contain the expected element.default boolean
waitNotContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection does not contain the expected element.default boolean
waitNotContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection does not contain the expected element.default boolean
waitNotContainsAll(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains some but not all elements from the expected collection.default boolean
waitNotContainsAll(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains some but not all elements from the expected collection.default boolean
waitNotContainsAll(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains some but not all elements from the expected collection.-
Methods inherited from interface org.catools.common.extensions.states.interfaces.CBaseState
getBaseValue
-
Methods inherited from interface org.catools.common.extensions.wait.interfaces.CBaseWaiter
getDefaultWaitInSeconds, getDefaultWaitIntervalInMilliSeconds
-
Methods inherited from interface org.catools.common.extensions.wait.interfaces.CObjectWaiter
_waiter, wait, wait, wait, waitEqualsAny, waitEqualsAny, waitEqualsAny, waitEqualsNone, waitEqualsNone, waitEqualsNone, waitIsNotNull, waitIsNotNull, waitIsNotNull, waitIsNull, waitIsNull, waitIsNull, waitNotEquals, waitNotEquals, waitNotEquals
-
-
-
-
Method Detail
-
waitHas
default boolean waitHas(java.util.function.Predicate<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection has the expected predicate.- Parameters:
expected
- predicate- Returns:
- true if wait operation succeed otherwise return false
-
waitHas
default boolean waitHas(java.util.function.Predicate<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains the expected predicate.- Parameters:
expected
- predicatewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitHas
default boolean waitHas(java.util.function.Predicate<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains the expected predicate.- Parameters:
expected
- predicatewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitContains
default boolean waitContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains the expected element.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitContains
default boolean waitContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitContains
default boolean waitContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsAll
default boolean waitContainsAll(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsAll
default boolean waitContainsAll(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsAll
default boolean waitContainsAll(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsNone
default boolean waitContainsNone(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains none of elements from the expected collection.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsNone
default boolean waitContainsNone(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains none of elements from the expected collection.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitContainsNone
default boolean waitContainsNone(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains none of elements from the expected collection.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrContains
default boolean waitEmptyOrContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection either is empty or contains the expected element.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrContains
default boolean waitEmptyOrContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection either is empty or contains the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrContains
default boolean waitEmptyOrContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection either is empty or contains the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrNotContains
default boolean waitEmptyOrNotContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection either is empty or does not contain the expected element.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrNotContains
default boolean waitEmptyOrNotContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection either is empty or does not contain the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitEmptyOrNotContains
default boolean waitEmptyOrNotContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection either is empty or does not contain the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitEquals
default boolean waitEquals(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.- Specified by:
waitEquals
in interfaceCObjectWaiter<E>
- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitEquals
default boolean waitEquals(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.- Specified by:
waitEquals
in interfaceCObjectWaiter<E>
- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitEquals
default boolean waitEquals(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.- Specified by:
waitEquals
in interfaceCObjectWaiter<E>
- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitIsEmpty
default boolean waitIsEmpty()
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection is empty.- Returns:
- true if wait operation succeed otherwise return false
-
waitIsEmpty
default boolean waitIsEmpty(int waitInSeconds)
Wait for defined number of seconds till the actual collection is empty.- Parameters:
waitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitIsEmpty
default boolean waitIsEmpty(int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection is empty.- Parameters:
waitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitIsNotEmpty
default boolean waitIsNotEmpty()
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection is not empty. (might contains null values)- Returns:
- true if wait operation succeed otherwise return false
-
waitIsNotEmpty
default boolean waitIsNotEmpty(int waitInSeconds)
Wait for defined number of seconds till the actual collection is not empty. (might contains null values)- Parameters:
waitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitIsNotEmpty
default boolean waitIsNotEmpty(int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection is not empty. (might contains null values)- Parameters:
waitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContains
default boolean waitNotContains(E expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection does not contain the expected element.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContains
default boolean waitNotContains(E expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection does not contain the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContains
default boolean waitNotContains(E expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection does not contain the expected element.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContainsAll
default boolean waitNotContainsAll(java.lang.Iterable<E> expected)
Wait forCTypeExtensionConfigs.getDefaultWaitInSeconds()
number of milliseconds till the actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.- Parameters:
expected
- value to compare- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContainsAll
default boolean waitNotContainsAll(java.lang.Iterable<E> expected, int waitInSeconds)
Wait for defined number of seconds till the actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait time- Returns:
- true if wait operation succeed otherwise return false
-
waitNotContainsAll
default boolean waitNotContainsAll(java.lang.Iterable<E> expected, int waitInSeconds, int intervalInMilliSeconds)
Wait for defined number of seconds till the actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.- Parameters:
expected
- value to comparewaitInSeconds
- maximum wait timeintervalInMilliSeconds
- interval between retries in milliseconds- Returns:
- true if wait operation succeed otherwise return false
-
-