Package com.landawn.abacus.util.stream
Class LongIteratorEx
- java.lang.Object
-
- com.landawn.abacus.util.LongIterator
-
- com.landawn.abacus.util.stream.LongIteratorEx
-
- All Implemented Interfaces:
IteratorEx<Long>
,Iterator<Long>
@Internal public abstract class LongIteratorEx extends LongIterator implements IteratorEx<Long>
-
-
Field Summary
Fields Modifier and Type Field Description static LongIteratorEx
EMPTY
-
Constructor Summary
Constructors Constructor Description LongIteratorEx()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
long
count()
static LongIteratorEx
empty()
static LongIteratorEx
from(Iterator<Long> iter)
static LongIteratorEx
of(long... a)
static LongIteratorEx
of(long[] a, int fromIndex, int toIndex)
static LongIteratorEx
of(Supplier<? extends LongIterator> iteratorSupplier)
Lazy evaluation.static LongIteratorEx
of(LongIterator iter)
static LongIteratorEx
oF(Supplier<long[]> arraySupplier)
Lazy evaluation.void
remove()
Deprecated.- UnsupportedOperationExceptionvoid
skip(long n)
<C extends Collection<T>>
CtoCollection(Supplier<? extends C> supplier)
ImmutableList<T>
toImmutableList()
ImmutableSet<T>
toImmutableSet()
Set<T>
toSet()
-
Methods inherited from class com.landawn.abacus.util.LongIterator
forEachIndexed, foreachRemaining, forEachRemaining, generate, generate, next, nextLong, stream, toArray, toList
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Field Detail
-
EMPTY
public static final LongIteratorEx EMPTY
-
-
Method Detail
-
empty
public static LongIteratorEx empty()
-
of
@SafeVarargs public static LongIteratorEx of(long... a)
-
of
public static LongIteratorEx of(long[] a, int fromIndex, int toIndex)
-
of
public static LongIteratorEx of(LongIterator iter)
-
of
public static LongIteratorEx of(Supplier<? extends LongIterator> iteratorSupplier)
Lazy evaluation.- Parameters:
iteratorSupplier
-- Returns:
-
oF
public static LongIteratorEx oF(Supplier<long[]> arraySupplier)
Lazy evaluation.- Parameters:
arraySupplier
-- Returns:
-
from
public static LongIteratorEx from(Iterator<Long> iter)
-
skip
public void skip(long n)
- Specified by:
skip
in interfaceIteratorEx<Long>
-
count
public long count()
- Specified by:
count
in interfaceIteratorEx<Long>
-
close
public void close()
- Specified by:
close
in interfaceIteratorEx<Long>
-
remove
@Deprecated public void remove() throws UnsupportedOperationException
Deprecated.- UnsupportedOperationException- Specified by:
remove
in interfaceIterator<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:
-
-