A - the element typepublic interface NonEmptyIterable<A> extends EnhancedIterable<A>
EnhancedIterable that is guaranteed to contain at least one element.
May be infinite or finite.
| Modifier and Type | Method and Description |
|---|---|
default NonEmptyIterable<A> |
concat(Iterable<A> other) |
default <B> NonEmptyIterable<B> |
fmap(com.jnape.palatable.lambda.functions.Fn1<? super A,? extends B> f) |
A |
head()
Returns the first element.
|
default NonEmptyIterable<A> |
intersperse(A a) |
default Iterator<A> |
iterator() |
static <A> NonEmptyIterable<A> |
nonEmptyIterable(A head,
Iterable<A> tail)
Creates a
NonEmptyIterable. |
default NonEmptyIterable<A> |
prependAll(A a) |
EnhancedIterable<A> |
tail()
Returns an
EnhancedIterable containing all subsequent elements beyond the first. |
default <B,C> NonEmptyIterable<C> |
zipWith(com.jnape.palatable.lambda.functions.Fn2<A,B,C> fn,
NonEmptyIterable<B> other) |
append, drop, dropWhile, enhance, filter, find, isEmpty, of, partition, prepend, slide, span, tails, take, takeWhile, toArray, toCollection, zipWithforEach, spliteratorA head()
AEnhancedIterable<A> tail()
EnhancedIterable containing all subsequent elements beyond the first.EnhancedIterable<A>. May be empty.default NonEmptyIterable<A> concat(Iterable<A> other)
concat in interface EnhancedIterable<A>default <B> NonEmptyIterable<B> fmap(com.jnape.palatable.lambda.functions.Fn1<? super A,? extends B> f)
fmap in interface EnhancedIterable<A>default NonEmptyIterable<A> intersperse(A a)
intersperse in interface EnhancedIterable<A>default NonEmptyIterable<A> prependAll(A a)
prependAll in interface EnhancedIterable<A>default <B,C> NonEmptyIterable<C> zipWith(com.jnape.palatable.lambda.functions.Fn2<A,B,C> fn, NonEmptyIterable<B> other)
static <A> NonEmptyIterable<A> nonEmptyIterable(A head, Iterable<A> tail)
NonEmptyIterable.A - the element typehead - the first elementtail - the remaining elements. May be empty.NonEmptyIterable<A>Copyright © 2019. All rights reserved.