Skip to content

Commit

Permalink
Deprecate isOrdered() and isStrictlyOrdered().
Browse files Browse the repository at this point in the history
Use isInOrder() and isStrictlyInOrder(), which are equivalent.

RELNOTES=Deprecated `isOrdered()` and `isStrictlyOrdered()`. Use `isInOrder()` and `isStrictlyInOrder()`, which are equivalent.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=247634669
  • Loading branch information
cpovirk authored and ronshapiro committed May 15, 2019
1 parent 21c29f7 commit 146080a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
24 changes: 12 additions & 12 deletions core/src/main/java/com/google/common/truth/IterableSubject.java
Original file line number Diff line number Diff line change
Expand Up @@ -846,55 +846,55 @@ public boolean check(Object prev, Object next) {
}

/**
* <i>To be deprecated in favor of {@link #isInStrictOrder()}.</i>
*
* <p>Fails if the iterable is not strictly ordered, according to the natural ordering of its
* Fails if the iterable is not strictly ordered, according to the natural ordering of its
* elements. Strictly ordered means that each element in the iterable is <i>strictly</i> greater
* than the element that preceded it.
*
* @throws ClassCastException if any pair of elements is not mutually Comparable
* @throws NullPointerException if any element is null
* @deprecated Use {@link #isInStrictOrder()}.
*/
@Deprecated
public final void isStrictlyOrdered() {
isInStrictOrder();
}

/**
* <i>To be deprecated in favor of {@link #isInStrictOrder(Comparator)}.</i>
*
* <p>Fails if the iterable is not strictly ordered, according to the given comparator. Strictly
* Fails if the iterable is not strictly ordered, according to the given comparator. Strictly
* ordered means that each element in the iterable is <i>strictly</i> greater than the element
* that preceded it.
*
* @throws ClassCastException if any pair of elements is not mutually Comparable
* @deprecated Use {@link #isInStrictOrder(Comparator)}.
*/
@Deprecated
@SuppressWarnings({"unchecked"})
public final void isStrictlyOrdered(final Comparator<?> comparator) {
isInStrictOrder(comparator);
}

/**
* <i>To be deprecated in favor of {@link #isInOrder()}.</i>
*
* <p>Fails if the iterable is not ordered, according to the natural ordering of its elements.
* 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
* @deprecated Use {@link #isInOrder()}
*/
@Deprecated
public final void isOrdered() {
isInOrder();
}

/**
* <i>To be deprecated in favor of {@link #isInOrder(Comparator)}.</i>
*
* <p>Fails if the iterable is not ordered, according to the given comparator. Ordered means that
* 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
* @deprecated Use {@link #isInOrder(Comparator)}.
*/
@Deprecated
@SuppressWarnings({"unchecked"})
public final void isOrdered(final Comparator<?> comparator) {
isInOrder(comparator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,14 @@ public void isInOrder(Comparator<?> comparator) {
}

/**
* <i>To be deprecated in favor of {@link #isInStrictOrder(Comparator)}.</i>
*
* <p>Fails if the iterable is not strictly ordered, according to the given comparator. Strictly
* Fails if the iterable is not strictly ordered, according to the given comparator. Strictly
* ordered means that each element in the iterable is <i>strictly</i> greater than the element
* that preceded it.
*
* @throws ClassCastException if any pair of elements is not mutually Comparable
* @deprecated Use {@link #isInStrictOrder(Comparator)}.
*/
@Deprecated
public void isStrictlyOrdered(Comparator<?> comparator) {
delegate().isStrictlyOrdered(comparator);
}
Expand All @@ -407,7 +407,9 @@ public void isStrictlyOrdered(Comparator<?> comparator) {
* 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
* @deprecated Use {@link #isInOrder(Comparator)}.
*/
@Deprecated
public void isOrdered(Comparator<?> comparator) {
delegate().isOrdered(comparator);
}
Expand Down

0 comments on commit 146080a

Please sign in to comment.