T - the type of elements returned by the enumerator.public interface IEnumerable<T> extends Iterable<T>
| Modifier and Type | Field and Description |
|---|---|
static IEnumerable |
EMPTY
An
IEnumerable that is always empty. |
| Modifier and Type | Method and Description |
|---|---|
default IEnumerable<T> |
concat(Iterable<? extends T> second)
Creates a composite enumerable that enumerates two given iterables one after the other.
|
static <T> IEnumerable<T> |
concat(Iterable<? extends T> first,
Iterable<? extends T> second)
Creates a composite enumerable that enumerates two given iterables one after the other.
|
static <T> IEnumerable<T> |
create(Iterable<T> iterable)
Returns an
IEnumerable wrapping the specified Iterable. |
static <T> IEnumerable<T> |
create(T value)
An
IEnumerable that enumerates a single item, only. |
IEnumerator<T> |
enumerator()
Returns an
IEnumerator over a set of elements of type T. |
default Iterator<T> |
iterator() |
default Stream<T> |
parallelStream()
Returns a parallel
Stream using the elements of this enumerable. |
default Stream<T> |
stream()
Returns a sequential
Stream using the elements of this enumerable. |
forEach, spliteratorstatic final IEnumerable EMPTY
IEnumerable that is always empty.default IEnumerable<T> concat(Iterable<? extends T> second)
second - The second one.IEnumerable which enumerate of the first iterable and then over the second.static <T> IEnumerable<T> concat(Iterable<? extends T> first, Iterable<? extends T> second)
first - The first one.second - The second one.IEnumerable which enumerate of the first iterable and then over the second.static <T> IEnumerable<T> create(Iterable<T> iterable)
IEnumerable wrapping the specified Iterable.T - The type of the elements returned by the Iterable.iterable - The iterable to wrap.IEnumerable wrapping the specified Iterable.static <T> IEnumerable<T> create(T value)
IEnumerable that enumerates a single item, only.T - The type of elements returned by the enumerator.value - The item to enumerate.IEnumerator<T> enumerator()
IEnumerator over a set of elements of type T.IEnumerator.default Stream<T> parallelStream()
Stream using the elements of this enumerable.Stream using the elements of this enumerable.