/** * Verifies that the actual AtomicReferenceArray contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertions will pass * assertThat(elvesRings).containsSubsequence(vilya, nenya) * .containsSubsequence(vilya, narya); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(nenya, vilya);</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual AtomicReferenceArray is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual AtomicReferenceArray does not contain the given subsequence. */ @Override public AtomicReferenceArrayAssert<T> containsSubsequence(@SuppressWarnings("unchecked") T... subsequence) { arrays.assertContainsSubsequence(info, array, subsequence); return myself; }
/** * Verifies that the actual array contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertions will pass * assertThat(elvesRings).containsSubsequence(vilya, nenya); * assertThat(elvesRings).containsSubsequence(vilya, narya); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(nenya, vilya);</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual group is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual group does not contain the given subsequence. */ @Override public SELF containsSubsequence(@SuppressWarnings("unchecked") ELEMENT... subsequence) { arrays.assertContainsSubsequence(info, actual, subsequence); return myself; }
/** * Verifies that the actual array contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertions will pass * assertThat(elvesRings).containsSubsequence(vilya, nenya); * assertThat(elvesRings).containsSubsequence(vilya, narya); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(nenya, vilya);</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual array does not contain the given subsequence. */ @Override public SELF containsSubsequence(@SuppressWarnings("unchecked") ELEMENT... subsequence) { arrays.assertContainsSubsequence(info, actual, subsequence); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertions will pass * assertThat(elvesRings).containsSubsequence(vilya, nenya) * .containsSubsequence(vilya, narya); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(nenya, vilya);</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual AtomicReferenceArray is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual AtomicReferenceArray does not contain the given subsequence. */ @Override public AtomicReferenceArrayAssert<T> containsSubsequence(@SuppressWarnings("unchecked") T... subsequence) { arrays.assertContainsSubsequence(info, array, subsequence); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertions will pass * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, nenya)) * .containsSubsequence(newArrayList(vilya, narya)); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(newArrayList(nenya, vilya));</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual AtomicReferenceArray is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual AtomicReferenceArray does not contain the given subsequence. */ @Override public AtomicReferenceArrayAssert<T> containsSubsequence(Iterable<? extends T> subsequence) { checkSubsequenceIsNotNull(subsequence); arrays.assertContainsSubsequence(info, array, toArray(subsequence)); return myself; }
/** * Verifies that the actual array contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertions will pass * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, narya)); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(newArrayList(nenya, vilya));</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual group is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual group does not contain the given subsequence. */ @Override public SELF containsSubsequence(Iterable<? extends ELEMENT> subsequence) { checkSubsequenceIsNotNull(subsequence); arrays.assertContainsSubsequence(info, actual, toArray(subsequence)); return myself; }
/** * Verifies that the actual array contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertions will pass * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, narya)); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(newArrayList(nenya, vilya));</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual array is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual array does not contain the given subsequence. */ @Override public SELF containsSubsequence(Iterable<? extends ELEMENT> subsequence) { checkSubsequenceIsNotNull(subsequence); arrays.assertContainsSubsequence(info, actual, toArray(subsequence)); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given subsequence in the correct order (possibly with other values between them). * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertions will pass * assertThat(elvesRings).containsSubsequence(newArrayList(vilya, nenya)) * .containsSubsequence(newArrayList(vilya, narya)); * * // assertion will fail * assertThat(elvesRings).containsSubsequence(newArrayList(nenya, vilya));</code></pre> * * @param subsequence the subsequence of objects to look for. * @return this assertion object. * @throws AssertionError if the actual AtomicReferenceArray is {@code null}. * @throws AssertionError if the given array is {@code null}. * @throws AssertionError if the actual AtomicReferenceArray does not contain the given subsequence. */ @Override public AtomicReferenceArrayAssert<T> containsSubsequence(Iterable<? extends T> subsequence) { checkSubsequenceIsNotNull(subsequence); arrays.assertContainsSubsequence(info, array, toArray(subsequence)); return myself; }
/** {@inheritDoc} */ @Override public S containsSubsequence(@SuppressWarnings("unchecked")T... subsequence) { arrays.assertContainsSubsequence(info, actual, subsequence); return myself; }