@FunctionalInterface
public interface LongIterable
extends java.lang.Iterable<java.lang.Long>
| Modifier and Type | Method and Description |
|---|---|
default void |
forEach(java.util.function.Consumer<? super java.lang.Long> consumer)
Performs the given action for each
long in this iterable. |
default void |
forEachLong(java.util.function.LongConsumer consumer)
Performs the given action for each
long in this iterable. |
static LongIterable |
from(java.lang.Iterable<java.lang.Long> iterable) |
static LongIterable |
from(java.util.Iterator<java.lang.Long> iterator) |
static LongIterable |
from(java.lang.Long... longs) |
static LongIterable |
from(LongIterator iterator) |
static LongIterable |
from(java.util.stream.LongStream longStream) |
static LongIterable |
from(java.lang.Object container)
Converts a container of some kind into a possibly once-only
LongIterable. |
static LongIterable |
from(java.util.stream.Stream<java.lang.Long> stream) |
LongIterator |
iterator() |
static LongIterable |
of(long... longs) |
LongIterator iterator()
iterator in interface java.lang.Iterable<java.lang.Long>default void forEach(java.util.function.Consumer<? super java.lang.Long> consumer)
long in this iterable.forEach in interface java.lang.Iterable<java.lang.Long>default void forEachLong(java.util.function.LongConsumer consumer)
long in this iterable.static LongIterable from(java.lang.Object container)
LongIterable.container - the non-null container to turn into an LongIterable, can be one of Iterable,
LongIterable, Iterator, LongIterator, Stream of Longs, LongStream, array of Longs, or long array.LongIterable.java.lang.ClassCastException - if the container is not one of the permitted classes.static LongIterable from(java.lang.Iterable<java.lang.Long> iterable)
static LongIterable from(LongIterator iterator)
static LongIterable from(java.util.Iterator<java.lang.Long> iterator)
static LongIterable from(java.util.stream.LongStream longStream)
static LongIterable of(long... longs)
static LongIterable from(java.lang.Long... longs)
static LongIterable from(java.util.stream.Stream<java.lang.Long> stream)