/** * {@inheritDoc} */ @Override public SELF containsSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); iterables.assertContainsSequence(info, actual, toArray(sequence)); return myself; }
/** * {@inheritDoc} */ @Override public SELF doesNotContainSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); iterables.assertDoesNotContainSequence(info, actual, toArray(sequence)); return myself; }
/** * {@inheritDoc} */ @Override public SELF containsSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); iterables.assertContainsSequence(info, actual, toArray(sequence)); return myself; }
/** * {@inheritDoc} */ @Override public SELF doesNotContainSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); iterables.assertDoesNotContainSequence(info, actual, toArray(sequence)); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given sequence in the given order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #doesNotContainSubsequence(Iterable)} to also ensure the sequence does not exist with values between the expected sequence values. * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertion will pass, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya)); * * // assertions will fail * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public AtomicReferenceArrayAssert<T> doesNotContainSequence(Iterable<? extends T> sequence) { checkSequenceIsNotNull(sequence); arrays.assertDoesNotContainSequence(info, array, toArray(sequence)); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given sequence in the correct order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #containsSubsequence(Object...)} to allow values between the expected sequence values. * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertion will pass * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)) * .containsSequence(newArrayList(nenya, narya)); * * // assertions will fail, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public AtomicReferenceArrayAssert<T> containsSequence(Iterable<? extends T> sequence) { checkSequenceIsNotNull(sequence); arrays.assertContainsSequence(info, array, toArray(sequence)); return myself; }
/** * Verifies that the actual array contains the given sequence in the correct order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #containsSubsequence(Iterable)} to allow values between the expected sequence values. * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertion will pass * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya)); * * // assertions will fail, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public SELF containsSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); arrays.assertContainsSequence(info, actual, toArray(sequence)); return myself; }
/** * Verifies that the actual array does not contain the given sequence in the given order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #doesNotContainSubsequence(Object...)} to also ensure the sequence does not exist with values between the expected sequence values. * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertion will pass, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya)); * * // assertions will fail * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public SELF doesNotContainSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); arrays.assertDoesNotContainSequence(info, actual, toArray(sequence)); return myself; }
/** * Verifies that the actual array contains the given sequence in the correct order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #containsSubsequence(Iterable)} to allow values between the expected sequence values. * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertion will pass * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya)); * * // assertions will fail, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public SELF containsSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); arrays.assertContainsSequence(info, actual, toArray(sequence)); return myself; }
/** * Verifies that the actual array does not contain the given sequence in the given order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #doesNotContainSubsequence(Object...)} to also ensure the sequence does not exist with values between the expected sequence values. * <p> * Example: * <pre><code class='java'> Ring[] elvesRings = {vilya, nenya, narya}; * * // assertion will pass, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya)); * * // assertions will fail * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public SELF doesNotContainSequence(Iterable<? extends ELEMENT> sequence) { checkSequenceIsNotNull(sequence); arrays.assertDoesNotContainSequence(info, actual, toArray(sequence)); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given sequence in the given order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #doesNotContainSubsequence(Iterable)} to also ensure the sequence does not exist with values between the expected sequence values. * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertion will pass, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya)); * * // assertions will fail * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, narya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public AtomicReferenceArrayAssert<T> doesNotContainSequence(Iterable<? extends T> sequence) { checkSequenceIsNotNull(sequence); arrays.assertDoesNotContainSequence(info, array, toArray(sequence)); return myself; }
/** * Verifies that the actual AtomicReferenceArray contains the given sequence in the correct order and <b>without extra values between the sequence values</b>. * <p> * Use {@link #containsSubsequence(Object...)} to allow values between the expected sequence values. * <p> * Example: * <pre><code class='java'> AtomicReferenceArray<Ring> elvesRings = new AtomicReferenceArray<>(new Ring[]{vilya, nenya, narya}); * * // assertion will pass * assertThat(elvesRings).containsSequence(newArrayList(vilya, nenya)) * .containsSequence(newArrayList(nenya, narya)); * * // assertions will fail, the elements order is correct but there is a value between them (nenya) * assertThat(elvesRings).containsSequence(newArrayList(vilya, narya)); * assertThat(elvesRings).containsSequence(newArrayList(nenya, vilya));</code></pre> * * @param sequence the sequence 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 sequence. */ @Override public AtomicReferenceArrayAssert<T> containsSequence(Iterable<? extends T> sequence) { checkSequenceIsNotNull(sequence); arrays.assertContainsSequence(info, array, toArray(sequence)); return myself; }