Class IteratorUtil


  • public final class IteratorUtil
    extends java.lang.Object
    Since:
    6.11.0
    Author:
    Clément Fournier
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.lang.Iterable<T> asReversed​(java.util.List<T> lst)  
      static int count​(java.util.Iterator<?> it)
      Counts the items in this iterator, exhausting it.
      static <T> java.util.Iterator<T> reverse​(java.util.Iterator<T> it)  
      static <T> java.lang.Iterable<T> toIterable​(java.util.Iterator<T> it)  
      static <T> java.util.List<T> toList​(java.util.Iterator<T> it)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • reverse

        public static <T> java.util.Iterator<T> reverse​(java.util.Iterator<T> it)
      • toList

        public static <T> java.util.List<T> toList​(java.util.Iterator<T> it)
      • toIterable

        public static <T> java.lang.Iterable<T> toIterable​(java.util.Iterator<T> it)
      • count

        public static int count​(java.util.Iterator<?> it)
        Counts the items in this iterator, exhausting it.
      • asReversed

        public static <T> java.lang.Iterable<T> asReversed​(java.util.List<T> lst)