Payload - The payload type.public final class OptionalSource<Payload> extends AbstractSource<Payload>
| Constructor and Description |
|---|
OptionalSource(Optional<Payload> optional)
Creates a new
OptionalSource. |
| Modifier and Type | Method and Description |
|---|---|
protected Payload |
doGetFirst()
Returns the first (i.e.
|
Optional<Payload> |
getOptional()
Returns the
Optional this OptionalSource has been created
with. |
ProtectedBidirectionalIterator<Payload> |
iterator()
Returns a
ProtectedIterator. |
int |
size()
Returns the number of payload values of this
Source. |
contains, containsAll, containsAll, containsMatch, createPredicate, firstIndexOf, getAll, getAllMatches, getFirst, getFirst, getFirstMatch, isEmpty, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic OptionalSource(Optional<Payload> optional) throws IllegalArgumentException
OptionalSource.optional - The Optional to be used.IllegalArgumentException - If the given optional is null.public Optional<Payload> getOptional()
Optional this OptionalSource has been created
with.Object.public int size()
SourceSource.Source.protected Payload doGetFirst()
AbstractSourceiterator) payload value, which is guaranteed to
exist.doGetFirst in class AbstractSource<Payload>public ProtectedBidirectionalIterator<Payload> iterator()
ProtectedIterableProtectedIterator.ProtectedIterator.Copyright © 2016–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.