Class Sorted<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>

    public final class Sorted<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>
    An Iterable decorator which returns the elements of the delegate in a sorted order, determined by a given Comparator.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sorted​(java.util.Comparator<? super T> comparator, java.lang.Iterable<T> delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<T> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • Sorted

        public Sorted​(java.util.Comparator<? super T> comparator,
                      java.lang.Iterable<T> delegate)
    • Method Detail

      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>