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