Class TriIterator<A,B,C>

java.lang.Object
com.landawn.abacus.util.TriIterator<A,B,C>
Type Parameters:
A -
B -
C -
All Implemented Interfaces:
Immutable, Iterator<Triple<A,B,C>>

public abstract class TriIterator<A,B,C> extends Object
Since:
1.2.10
Author:
Haiyang Li
  • Constructor Details

    • TriIterator

      public TriIterator()
  • Method Details

    • empty

      public static <A, B, C> TriIterator<A,B,C> empty()
      Type Parameters:
      A -
      B -
      C -
      Returns:
    • generate

      public static <A, B, C> TriIterator<A,B,C> generate(Consumer<Triple<A,B,C>> output)
      Returns an infinite BiIterator.
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      output - transfer the next values.
      Returns:
    • generate

      public static <A, B, C> TriIterator<A,B,C> generate(BooleanSupplier hasNext, Consumer<Triple<A,B,C>> output)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      hasNext -
      output -
      Returns:
    • generate

      public static <A, B, C> TriIterator<A,B,C> generate(int fromIndex, int toIndex, IndexedConsumer<Triple<A,B,C>> output)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      fromIndex -
      toIndex -
      output -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(A[] a, B[] b, C[] c)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      a -
      b -
      c -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      a -
      b -
      c -
      valueForNoneA -
      valueForNoneB -
      valueForNoneC -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(Collection<A> a, Collection<B> b, Collection<C> c)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      a -
      b -
      c -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(Collection<A> a, Collection<B> b, Collection<C> c, A valueForNoneA, B valueForNoneB, C valueForNoneC)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      a -
      b -
      c -
      valueForNoneA -
      valueForNoneB -
      valueForNoneC -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(Iterator<A> iterA, Iterator<B> iterB, Iterator<C> iterC)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      iterA -
      iterB -
      iterC -
      Returns:
    • zip

      public static <A, B, C> TriIterator<A,B,C> zip(Iterator<A> iterA, Iterator<B> iterB, Iterator<C> iterC, A valueForNoneA, B valueForNoneB, C valueForNoneC)
      Type Parameters:
      A -
      B -
      C -
      Parameters:
      iterA -
      iterB -
      iterC -
      valueForNoneA -
      valueForNoneB -
      valueForNoneC -
      Returns:
    • unzip

      public static <T, A, B, C> TriIterator<A,B,C> unzip(Iterator<? extends T> iter, BiConsumer<? super T,Triple<A,B,C>> unzip)
      Type Parameters:
      T -
      A -
      B -
      C -
      Parameters:
      iter -
      unzip - output parameter.
      Returns:
    • forEachRemaining

      public abstract <E extends Exception> void forEachRemaining(Throwables.TriConsumer<? super A,? super B,? super C,E> action) throws E
      For each remaining.
      Type Parameters:
      E -
      Parameters:
      action -
      Throws:
      E - the e
    • forEachRemaining

      @Deprecated public void forEachRemaining(Consumer<? super Triple<A,B,C>> action)
      Deprecated.
      It's preferred to call forEachRemaining(Try.TriConsumer) to avoid the create the unnecessary Triple Objects.
      Parameters:
      action -
    • map

      public abstract <R> ObjIterator<R> map(TriFunction<? super A,? super B,? super C,R> mapper)
      Type Parameters:
      R -
      Parameters:
      mapper -
      Returns:
    • stream

      public <R> Stream<R> stream(TriFunction<? super A,? super B,? super C,R> mapper)
      Type Parameters:
      R -
      Parameters:
      mapper -
      Returns:
    • toArray

      public Triple<A,B,C>[] toArray()
    • toArray

      public <T> T[] toArray(T[] a)
    • toList

      public List<Triple<A,B,C>> toList()
    • remove

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

      public Set<Triple<A,B,C>> toSet()
    • toCollection

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

      public ImmutableList<Triple<A,B,C>> toImmutableList()
    • toImmutableSet

      public ImmutableSet<Triple<A,B,C>> toImmutableSet()