/** * Verifies that there are <b>at least</b> <i>n</i> elements in the actual AtomicReferenceArray satisfying the given condition. * <p> * Example : * <pre><code class='java'> AtomicReferenceArray<Integer> oneThwoThree = new AtomicReferenceArray<>(new Integer[]{1, 2, 3}); * * Condition<Integer> oddNumber = new Condition<>(value % 2 == 1, "odd number"); * * // assertion will pass * oneThwoThree.areAtLeast(2, oddNumber); * * // assertion will fail * oneThwoThree.areAtLeast(3, oddNumber);</code></pre> * * @param times the minimum number of times the condition should be verified. * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element can not be cast to T. * @throws AssertionError if the number of elements satisfying the given condition is < n. */ @Override public AtomicReferenceArrayAssert<T> areAtLeast(int times, Condition<? super T> condition) { arrays.assertAreAtLeast(info, array, times, condition); return myself; }
/** * Verifies that there are <b>at least</b> <i>n</i> elements in the actual group satisfying the given condition. * <p> * Example : * <pre><code class='java'> int[] oneTwoThree = {1, 2, 3}; * * Condition<Integer> oddNumber = new Condition<>(value % 2 == 1, "odd number"); * * // assertion will pass * oneTwoThree.areAtLeast(2, oddNumber); * * // assertion will fail * oneTwoThree.areAtLeast(3, oddNumber);</code></pre> * * @param times the minimum number of times the condition should be verified. * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element can not be cast to T. * @throws AssertionError if the number of elements satisfying the given condition is < n. */ @Override public SELF areAtLeast(int times, Condition<? super ELEMENT> condition) { arrays.assertAreAtLeast(info, actual, times, condition); return myself; }
/** * Verifies that there are <b>at least</b> <i>n</i> elements in the actual array satisfying the given condition. * <p> * Example : * <pre><code class='java'> int[] oneTwoThree = {1, 2, 3}; * * Condition<Integer> oddNumber = new Condition<>(value % 2 == 1, "odd number"); * * // assertion will pass * oneTwoThree.areAtLeast(2, oddNumber); * * // assertion will fail * oneTwoThree.areAtLeast(3, oddNumber);</code></pre> * * @param times the minimum number of times the condition should be verified. * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element can not be cast to T. * @throws AssertionError if the number of elements satisfying the given condition is < n. */ @Override public SELF areAtLeast(int times, Condition<? super ELEMENT> condition) { arrays.assertAreAtLeast(info, actual, times, condition); return myself; }
/** * Verifies that there are <b>at least</b> <i>n</i> elements in the actual AtomicReferenceArray satisfying the given condition. * <p> * Example : * <pre><code class='java'> AtomicReferenceArray<Integer> oneThwoThree = new AtomicReferenceArray<>(new Integer[]{1, 2, 3}); * * Condition<Integer> oddNumber = new Condition<>(value % 2 == 1, "odd number"); * * // assertion will pass * oneThwoThree.areAtLeast(2, oddNumber); * * // assertion will fail * oneThwoThree.areAtLeast(3, oddNumber);</code></pre> * * @param times the minimum number of times the condition should be verified. * @param condition the given condition. * @return {@code this} object. * @throws NullPointerException if the given condition is {@code null}. * @throws AssertionError if an element can not be cast to T. * @throws AssertionError if the number of elements satisfying the given condition is < n. */ @Override public AtomicReferenceArrayAssert<T> areAtLeast(int times, Condition<? super T> condition) { arrays.assertAreAtLeast(info, array, times, condition); return myself; }
/** {@inheritDoc} */ @Override public S areAtLeast(int times, Condition<? super T> condition) { arrays.assertAreAtLeast(info, actual, times, condition); return myself; }