| Constructor and Description |
|---|
Sorted(Comparator<T> comparator,
Iterator<T> iterator)
Ctor.
|
Sorted(Iterator<T> items)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
T |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removepublic Sorted(Iterator<T> items)
If you're using this ctor you must be sure that type T
implements Comparable interface. Otherwise, there will be
a type casting exception in runtime.
items - The underlying iteratorpublic Sorted(Comparator<T> comparator, Iterator<T> iterator)
iterator - The underlying iteratorcomparator - The comparatorCopyright © 2017–2018 Cactoos. All rights reserved.