Payload - The payload type.public final class ObjectSource<Payload> extends AbstractSource<Payload>
ObjectSource is an AbstractSource that is backed by a
single payload value.| Constructor and Description |
|---|
ObjectSource(Payload value)
Creates a new
ObjectSource for the given payload object. |
ObjectSource(Payload value,
boolean ignoreNull)
Creates a new
ObjectSource for the given payload object. |
| Modifier and Type | Method and Description |
|---|---|
protected Payload |
doGetFirst()
Returns the first (i.e.
|
Payload |
getValue()
Returns the payload value this
ObjectSource has been created with. |
boolean |
hasValue()
Returns whether this
ObjectSource has a value. |
ProtectedIterator<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 ObjectSource(Payload value)
ObjectSource for the given payload object.value - The payload value to be used.public ObjectSource(Payload value, boolean ignoreNull)
ObjectSource for the given payload object.value - The payload value to be used.ignoreNull - Whether to ignore null values.public boolean hasValue()
ObjectSource has a value.ObjectSource has a value.public Payload getValue() throws NoSuchElementException
ObjectSource has been created with.NoSuchElementException - If this ObjectSource has no value.public int size()
SourceSource.Source.protected Payload doGetFirst()
AbstractSourceiterator) payload value, which is guaranteed to
exist.doGetFirst in class AbstractSource<Payload>public ProtectedIterator<Payload> iterator()
ProtectedIterableProtectedIterator.ProtectedIterator.Copyright © 2016–2017 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.