Class ObjIteratorEx<T>

java.lang.Object
com.landawn.abacus.util.ObjIterator<T>
com.landawn.abacus.util.stream.ObjIteratorEx<T>
All Implemented Interfaces:
Immutable, IteratorEx<T>, Iterator<T>

@Internal public abstract class ObjIteratorEx<T> extends ObjIterator<T> implements IteratorEx<T>
  • Constructor Details

    • ObjIteratorEx

      public ObjIteratorEx()
  • Method Details

    • empty

      public static <T> ObjIteratorEx<T> empty()
      Type Parameters:
      T -
      Returns:
    • of

      @SafeVarargs public static <T> ObjIteratorEx<T> of(T... a)
      Type Parameters:
      T -
      Parameters:
      a -
      Returns:
    • of

      public static <T> ObjIteratorEx<T> of(T[] a, int fromIndex, int toIndex)
      Type Parameters:
      T -
      Parameters:
      a -
      fromIndex -
      toIndex -
      Returns:
    • of

      public static <T> ObjIteratorEx<T> of(Collection<? extends T> c)
      Type Parameters:
      T -
      Parameters:
      c -
      Returns:
    • of

      public static <T> ObjIteratorEx<T> of(Iterator<? extends T> iter)
      Type Parameters:
      T -
      Parameters:
      iter -
      Returns:
    • of

      public static <T> ObjIteratorEx<T> of(Iterable<? extends T> iterable)
      Type Parameters:
      T -
      Parameters:
      iterable -
      Returns:
    • defer

      public static <T> ObjIteratorEx<T> defer(Supplier<? extends Iterator<? extends T>> iteratorSupplier)
      Lazy evaluation.
      Type Parameters:
      T -
      Parameters:
      iteratorSupplier -
      Returns:
    • advance

      public void advance(long n)
      Specified by:
      advance in interface IteratorEx<T>
      Parameters:
      n -
    • count

      public long count()
      Specified by:
      count in interface IteratorEx<T>
      Returns:
    • close

      public void close()
      Specified by:
      close in interface IteratorEx<T>
    • remove

      @Deprecated public void remove() throws UnsupportedOperationException
      Deprecated.
      - UnsupportedOperationException
      Specified by:
      remove in interface Iterator<T>
      Throws:
      UnsupportedOperationException
    • toSet

      public Set<T> toSet()
      Returns:
    • toCollection

      public <C extends Collection<T>> C toCollection(Supplier<? extends C> supplier)
      Type Parameters:
      C -
      Parameters:
      supplier -
      Returns:
    • toImmutableList

      public ImmutableList<T> toImmutableList()
      Returns:
    • toImmutableSet

      public ImmutableSet<T> toImmutableSet()
      Returns: