public abstract class ShortIterator extends Object
Modifier and Type | Field and Description |
---|---|
static ShortIterator |
EMPTY |
Constructor and Description |
---|
ShortIterator() |
Modifier and Type | Method and Description |
---|---|
static ShortIterator |
empty() |
<E extends Exception> |
forEachIndexed(Throwables.IndexedShortConsumer<E> action) |
void |
forEachRemaining(Consumer<? super Short> action)
Deprecated.
|
<E extends Exception> |
foreachRemaining(Throwables.ShortConsumer<E> action) |
static ShortIterator |
generate(BooleanSupplier hasNext,
ShortSupplier supplier) |
static ShortIterator |
generate(ShortSupplier supplier)
Returns an infinite
ShortIterator . |
Short |
next()
Deprecated.
|
abstract short |
nextShort() |
static ShortIterator |
of(short... a) |
static ShortIterator |
of(short[] a,
int fromIndex,
int toIndex) |
static ShortIterator |
of(Supplier<? extends ShortIterator> iteratorSupplier)
Lazy evaluation.
|
static ShortIterator |
oF(Supplier<short[]> arraySupplier)
Lazy evaluation.
|
void |
remove()
Deprecated.
- UnsupportedOperationException
|
ShortStream |
stream() |
short[] |
toArray() |
<C extends Collection<T>> |
toCollection(Supplier<? extends C> supplier) |
ImmutableList<T> |
toImmutableList() |
ImmutableSet<T> |
toImmutableSet() |
ShortList |
toList() |
Set<T> |
toSet() |
public static final ShortIterator EMPTY
public static ShortIterator empty()
@SafeVarargs public static ShortIterator of(short... a)
a
- public static ShortIterator of(short[] a, int fromIndex, int toIndex)
a
- fromIndex
- toIndex
- public static ShortIterator of(Supplier<? extends ShortIterator> iteratorSupplier)
iteratorSupplier
- public static ShortIterator oF(Supplier<short[]> arraySupplier)
arraySupplier
- public static ShortIterator generate(ShortSupplier supplier)
ShortIterator
.supplier
- public static ShortIterator generate(BooleanSupplier hasNext, ShortSupplier supplier)
hasNext
- supplier
- @Deprecated public Short next()
public abstract short nextShort()
public short[] toArray()
public ShortList toList()
public ShortStream stream()
public <E extends Exception> void foreachRemaining(Throwables.ShortConsumer<E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
@Deprecated public void forEachRemaining(Consumer<? super Short> action)
action
- public <E extends Exception> void forEachIndexed(Throwables.IndexedShortConsumer<E> action) throws E extends Exception
E
- action
- E
- the eE extends Exception
@Deprecated public void remove() throws UnsupportedOperationException
remove
in interface Iterator<T>
UnsupportedOperationException
public Set<T> toSet()
public <C extends Collection<T>> C toCollection(Supplier<? extends C> supplier)
C
- supplier
- public ImmutableList<T> toImmutableList()
public ImmutableSet<T> toImmutableSet()
Copyright © 2020. All rights reserved.