/** * Verifies that all elements don't satisfy the given condition. * <p> * Example : * <pre><code class='java'> AtomicReferenceArray<String> abc = new AtomicReferenceArray<>(new String[]{"a", "b", "c"}); * AtomicReferenceArray<String> abcc = new AtomicReferenceArray<>(new String[]{"a", "b", "cc"}); * * Condition<String> moreThanOneCharacter = * = new Condition<>(s -> s.length() > 1, "more than one character"); * * // assertion will pass * assertThat(abc).doNotHave(moreThanOneCharacter); * * // assertion will fail * assertThat(abcc).doNotHave(moreThanOneCharacter);</code></pre> * * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element cannot be cast to T. * @throws AssertionError if one or more elements satisfy the given condition. */ @Override public AtomicReferenceArrayAssert<T> doNotHave(Condition<? super T> condition) { arrays.assertDoNotHave(info, array, condition); return myself; }
/** * Verifies that all elements don't satisfy the given condition. * <p> * Example : * <pre><code class='java'> String[] abc = {"a", "b", "c"}; * String[] abcc = {"a", "b", "cc"}; * * Condition<String> moreThanOneCharacter = * = new Condition<>(s -> s.length() > 1, "more than one character"); * * // assertion will pass * assertThat(abc).doNotHave(moreThanOneCharacter); * * // assertion will fail * assertThat(abcc).doNotHave(moreThanOneCharacter);</code></pre> * * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element cannot be cast to ELEMENT. * @throws AssertionError if one or more elements satisfy the given condition. */ @Override public SELF doNotHave(Condition<? super ELEMENT> condition) { arrays.assertDoNotHave(info, actual, condition); return myself; }
/** * Verifies that all elements don't satisfy the given condition. * <p> * Example : * <pre><code class='java'> String[] abc = {"a", "b", "c"}; * String[] abcc = {"a", "b", "cc"}; * * Condition<String> moreThanOneCharacter = * = new Condition<>(s -> s.length() > 1, "more than one character"); * * // assertion will pass * assertThat(abc).doNotHave(moreThanOneCharacter); * * // assertion will fail * assertThat(abcc).doNotHave(moreThanOneCharacter);</code></pre> * * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element cannot be cast to ELEMENT. * @throws AssertionError if one or more elements satisfy the given condition. */ @Override public SELF doNotHave(Condition<? super ELEMENT> condition) { arrays.assertDoNotHave(info, actual, condition); return myself; }
/** * Verifies that all elements don't satisfy the given condition. * <p> * Example : * <pre><code class='java'> AtomicReferenceArray<String> abc = new AtomicReferenceArray<>(new String[]{"a", "b", "c"}); * AtomicReferenceArray<String> abcc = new AtomicReferenceArray<>(new String[]{"a", "b", "cc"}); * * Condition<String> moreThanOneCharacter = * = new Condition<>(s -> s.length() > 1, "more than one character"); * * // assertion will pass * assertThat(abc).doNotHave(moreThanOneCharacter); * * // assertion will fail * assertThat(abcc).doNotHave(moreThanOneCharacter);</code></pre> * * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element cannot be cast to T. * @throws AssertionError if one or more elements satisfy the given condition. */ @Override public AtomicReferenceArrayAssert<T> doNotHave(Condition<? super T> condition) { arrays.assertDoNotHave(info, array, condition); return myself; }
/** {@inheritDoc} */ @Override public S doNotHave(Condition<? super T> condition) { arrays.assertDoNotHave(info, actual, condition); return myself; }