Package com.google.common.collect
Interface SortedIterable<T>
-
- All Superinterfaces:
java.lang.Iterable<T>
- All Known Subinterfaces:
SortedMultiset<E>
- All Known Implementing Classes:
AbstractSortedMultiset
,ContiguousSet
,DescendingImmutableSortedMultiset
,DescendingImmutableSortedSet
,DescendingMultiset
,EmptyContiguousSet
,ForwardingSortedMultiset
,ForwardingSortedMultiset.StandardDescendingMultiset
,ImmutableRangeSet.AsSet
,ImmutableSortedAsList
,ImmutableSortedMultiset
,ImmutableSortedSet
,RegularContiguousSet
,RegularImmutableSortedMultiset
,RegularImmutableSortedSet
,TreeMultiset
,UnmodifiableSortedMultiset
@GwtCompatible interface SortedIterable<T> extends java.lang.Iterable<T>
AnIterable
whose elements are sorted relative to aComparator
, typically provided at creation time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Comparator<? super T>
comparator()
Returns theComparator
by which the elements of this iterable are ordered, orOrdering.natural()
if the elements are ordered by their natural ordering.java.util.Iterator<T>
iterator()
Returns an iterator over elements of typeT
.
-
-
-
Method Detail
-
comparator
java.util.Comparator<? super T> comparator()
Returns theComparator
by which the elements of this iterable are ordered, orOrdering.natural()
if the elements are ordered by their natural ordering.
-
iterator
java.util.Iterator<T> iterator()
Returns an iterator over elements of typeT
. The elements are returned in nondecreasing order according to the associatedcomparator()
.- Specified by:
iterator
in interfacejava.lang.Iterable<T>
-
-