interface SortedIterable<T>
extends java.lang.Iterable<T>
Iterable whose elements are sorted relative to a Comparator, typically
provided at creation time.| Modifier and Type | Method and Description |
|---|---|
java.util.Comparator<? super T> |
comparator()
Returns the
Comparator by which the elements of this iterable are ordered, or Ordering.natural() if the elements are ordered by their natural ordering. |
java.util.Iterator<T> |
iterator()
Returns an iterator over elements of type
T. |
java.util.Comparator<? super T> comparator()
Comparator by which the elements of this iterable are ordered, or Ordering.natural() if the elements are ordered by their natural ordering.java.util.Iterator<T> iterator()
T. The elements are returned in nondecreasing
order according to the associated comparator().iterator in interface java.lang.Iterable<T>