/** * Fails if the iterable is not ordered, according to the natural ordering of its elements. * Ordered means that each element in the iterable is greater than or equal to the element that * preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ public final void isOrdered() { isOrdered(Ordering.natural()); }
/** * Fails if the iterable is not ordered, according to the given comparator. Ordered means that * each element in the iterable is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ public void isOrdered(Comparator<?> comparator) { delegate().isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }
@Test public void start_shouldRunAnimation() { final List<Integer> values = new ArrayList<>(); ShadowChoreographer.setFrameInterval(100 * TimeUtils.NANOS_PER_MS); final ValueAnimator animator = ValueAnimator.ofInt(0, 10); animator.setDuration(1000); animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { values.add((int) animation.getAnimatedValue()); } }); animator.start(); assertThat(values).isOrdered(Ordering.natural()); }
/** * Fails if the iterable is not ordered, according to the given comparator. Ordered means that * each element in the iterable is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ public void isOrdered(Comparator<?> comparator) { delegate().isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }
/** * Fails if the subject is not ordered, according to the given comparator. Ordered means that each * element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder(Comparator<?> comparator) { check().that(actualList).isOrdered(comparator); }
/** * Fails if the subject is not ordered, according to the natural ordering of its elements. Ordered * means that each element in the stream is greater than or equal to the element that preceded it. * * @throws ClassCastException if any pair of elements is not mutually Comparable * @throws NullPointerException if any element is null */ // TODO(kak): Make this public once go/truth-stream-isinorder is decided private void isInOrder() { check().that(actualList).isOrdered(); }