@Test public void reverse() { SortedObjectSequence<Integer> reversed = seq.reverse(); assertTrue(reversed.isSorted()); assertTrue(reversed.isNonnull()); assertTrue(reversed.isDistinct()); assertSame(Comparator.reverseOrder(), reversed.getComparator()); assertThat(reversed, contains(new Integer(9), 7, 5, 3, 1)); assertEquals(new Integer(7), reversed.get(1)); }
@Override public SortedObjectSequence<T> reverse() { return new SortedObjectSequence<>(partition.reverse(), reverseComparator(comparator), nonnull, distinct); }
SortedObjectSequence implements ObjectSequence<T> { @Override public SortedObjectSequence<T> reverse() { return new SortedObjectSequence<>(partition.reverse(), reverseComparator(comparator), nonnull, distinct); } }
SortedObjectSequence implements ObjectSequence<T> { @Override public SortedObjectSequence<T> reverse() { return new SortedObjectSequence<>(partition.reverse(), reverseComparator(comparator), nonnull, distinct); } SortedObjectSequence(@NonNull ObjectSequence<T> seq, @NonNull Comparator<? super T> comparator); }
SortedObjectSequence implements ObjectSequence<T> { @Override public SortedObjectSequence<T> reverse() { return new SortedObjectSequence<>(partition.reverse(), reverseComparator(comparator), nonnull, distinct); } SortedObjectSequence(@NonNull ObjectSequence<T> seq, @NonNull Comparator<? super T> comparator); @Override boolean isSorted(); @Override T get(int index); @Override Comparator<C> getComparator(); @Override Iterator<T> iterator(); @Override Spliterator<T> spliterator(); @Override Stream<T> stream(); @Override Stream<T> parallelStream(); @Override int size(); @Override boolean isEmpty(); @Override SortedObjectSequence<T> reverse(); }
SortedObjectSequence implements ObjectSequence<T> { @Override public SortedObjectSequence<T> reverse() { return new SortedObjectSequence<>(partition.reverse(), reverseComparator(comparator), nonnull, distinct); } SortedObjectSequence(@NonNull ObjectSequence<T> seq, @NonNull Comparator<? super T> comparator); @Override boolean isSorted(); @Override T get(int index); @Override Comparator<C> getComparator(); @Override Iterator<T> iterator(); @Override Spliterator<T> spliterator(); @Override Stream<T> stream(); @Override Stream<T> parallelStream(); @Override int size(); @Override boolean isEmpty(); @Override SortedObjectSequence<T> reverse();  }