| Constructor and Description |
|---|
OneElement() |
| Modifier and Type | Method and Description |
|---|---|
E |
apply(Iterator<E> consumable)
Consumes the iterator and yields the only element contained in it.
|
public E apply(Iterator<E> consumable)
apply in interface Function<Iterator<E>,E>consumable - the iterator to be consumedIllegalArgumentException - if the source iterator is emptyIllegalStateException - if the source iterator contains more than
one elementCopyright © 2017. All rights reserved.