Package com.landawn.abacus.util
Class TriIterator<A,B,C>
java.lang.Object
com.landawn.abacus.util.TriIterator<A,B,C>
- Type Parameters:
A
-B
-C
-
- Since:
- 1.2.10
- Author:
- Haiyang Li
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,
B, C> TriIterator<A, B, C> empty()
TriIterator<A,
B, C> filter
(TriPredicate<? super A, ? super B, ? super C> predicate) u.Optional<Triple<A,
B, C>> first()
abstract <E extends Exception>
voidforEachRemaining
(Throwables.TriConsumer<? super A, ? super B, ? super C, E> action) For each remaining.void
Deprecated.static <A,
B, C> TriIterator<A, B, C> generate
(int fromIndex, int toIndex, IndexedConsumer<Triple<A, B, C>> output) static <A,
B, C> TriIterator<A, B, C> generate
(BooleanSupplier hasNext, Consumer<Triple<A, B, C>> output) static <A,
B, C> TriIterator<A, B, C> Returns an infiniteBiIterator
.u.Optional<Triple<A,
B, C>> last()
TriIterator<A,
B, C> limit
(long count) abstract <R> ObjIterator<R>
map
(TriFunction<? super A, ? super B, ? super C, ? extends R> mapper) void
remove()
Deprecated.- UnsupportedOperationExceptionTriIterator<A,
B, C> skip
(long n) <R> Stream<R>
stream
(TriFunction<? super A, ? super B, ? super C, ? extends R> mapper) toArray()
<T> T[]
toArray
(T[] a) Deprecated.<C extends Collection<T>>
CtoCollection
(Supplier<? extends C> supplier) ImmutableList<Triple<A,
B, C>> ImmutableSet<Triple<A,
B, C>> toList()
toSet()
static <T,
A, B, C> TriIterator<A, B, C> unzip
(Iterable<? extends T> iter, BiConsumer<? super T, Triple<A, B, C>> unzipFunc) static <T,
A, B, C> TriIterator<A, B, C> unzip
(Iterator<? extends T> iter, BiConsumer<? super T, Triple<A, B, C>> unzipFunc) static <A,
B, C> TriIterator<A, B, C> zip
(A[] a, B[] b, C[] c) static <A,
B, C> TriIterator<A, B, C> zip
(A[] a, B[] b, C[] c, A valueForNoneA, B valueForNoneB, C valueForNoneC) static <A,
B, C> TriIterator<A, B, C> static <A,
B, C> TriIterator<A, B, C> static <A,
B, C> TriIterator<A, B, C> static <A,
B, C> TriIterator<A, B, C> zip
(Iterator<A> iterA, Iterator<B> iterB, Iterator<C> iterC, A valueForNoneA, B valueForNoneB, C valueForNoneC)
-
Constructor Details
-
TriIterator
public TriIterator()
-
-
Method Details
-
empty
- Type Parameters:
A
-B
-C
-- Returns:
-
generate
Returns an infiniteBiIterator
.- Type Parameters:
A
-B
-C
-- Parameters:
output
- transfer the next values.- Returns:
-
generate
public static <A,B, TriIterator<A,C> B, generateC> (BooleanSupplier hasNext, Consumer<Triple<A, B, C>> output) - Type Parameters:
A
-B
-C
-- Parameters:
hasNext
-output
-- Returns:
-
generate
public static <A,B, TriIterator<A,C> B, generateC> (int fromIndex, int toIndex, IndexedConsumer<Triple<A, B, C>> output) - Type Parameters:
A
-B
-C
-- Parameters:
fromIndex
-toIndex
-output
-- Returns:
-
zip
- Type Parameters:
A
-B
-C
-- Parameters:
a
-b
-c
-- Returns:
-
zip
public static <A,B, TriIterator<A,C> B, zipC> (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
- Type Parameters:
A
-B
-C
-- Parameters:
a
-b
-c
-- Returns:
-
zip
public static <A,B, TriIterator<A,C> B, zipC> (Iterable<A> a, Iterable<B> b, Iterable<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, TriIterator<A,C> B, zipC> (Iterator<A> iterA, Iterator<B> iterB, Iterator<C> iterC) - Type Parameters:
A
-B
-C
-- Parameters:
iterA
-iterB
-iterC
-- Returns:
-
zip
public static <A,B, TriIterator<A,C> B, zipC> (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, TriIterator<A,B, C> B, unzipC> (Iterable<? extends T> iter, BiConsumer<? super T, Triple<A, B, C>> unzipFunc) - Type Parameters:
T
-A
-B
-C
-- Parameters:
iter
-unzipFunc
- output parameter.- Returns:
-
unzip
public static <T,A, TriIterator<A,B, C> B, unzipC> (Iterator<? extends T> iter, BiConsumer<? super T, Triple<A, B, C>> unzipFunc) - Type Parameters:
T
-A
-B
-C
-- Parameters:
iter
-unzipFunc
- output parameter.- Returns:
-
forEachRemaining
public abstract <E extends Exception> void forEachRemaining(Throwables.TriConsumer<? super A, ? super B, throws E? super C, E> action) For each remaining.- Type Parameters:
E
-- Parameters:
action
-- Throws:
E
- the e
-
forEachRemaining
Deprecated.It's preferred to callforEachRemaining(Try.TriConsumer)
to avoid the create the unnecessaryTriple
Objects.- Parameters:
action
-
-
skip
- Parameters:
n
-- Returns:
-
limit
- Parameters:
count
-- Returns:
-
filter
- Parameters:
predicate
-- Returns:
-
map
public abstract <R> ObjIterator<R> map(TriFunction<? super A, ? super B, ? super C, ? extends R> mapper) - Type Parameters:
R
-- Parameters:
mapper
-- Returns:
-
first
- Returns:
-
last
- Returns:
-
stream
- Type Parameters:
R
-- Parameters:
mapper
-- Returns:
-
toArray
- Returns:
-
toArray
Deprecated.- Type Parameters:
T
-- Parameters:
a
-- Returns:
-
toList
- Returns:
-
remove
Deprecated.- UnsupportedOperationException- Specified by:
remove
in interfaceIterator<T>
- Throws:
UnsupportedOperationException
-
toSet
- Returns:
-
toCollection
- Type Parameters:
C
-- Parameters:
supplier
-- Returns:
-
toImmutableList
- Returns:
-
toImmutableSet
- Returns:
-