Interface SortedIterable<T>

All Superinterfaces:
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

interface SortedIterable<T> extends Iterable<T>
An Iterable whose elements are sorted relative to a Comparator, typically provided at creation time.
  • Method Summary

    Modifier and Type
    Method
    Description
    Comparator<? super T>
    Returns the Comparator by which the elements of this iterable are ordered, or Ordering.natural() if the elements are ordered by their natural ordering.
    Returns an iterator over elements of type T.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • comparator

      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.
    • iterator

      Iterator<T> iterator()
      Returns an iterator over elements of type T. The elements are returned in nondecreasing order according to the associated comparator().
      Specified by:
      iterator in interface Iterable<T>