Class CObjectWait

    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CObjectWait

        public CObjectWait()
    • 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 compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - 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 compare
        expected - value to compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - 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 compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - 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 compare
        waitInSeconds - maximum wait time
        intervalInMilliSeconds - interval between retries in milliseconds
        Returns:
        return actual value or null if the timeout reached