T - public final class CollectionMessageSequence<T> extends AbstractMessageSequence<T>
MessageSequence that retrieves elements from a Collection. Its
estimated size is initially the size of the collection, and decreases when
elements are consumed using next()UNKNOWN_SIZE| Constructor and Description |
|---|
CollectionMessageSequence(Collection<T> collection) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Whether this sequence has more elements.
|
T |
next()
The next element of the sequence.
|
int |
size()
The number of members of the sequence.
|
isEmpty, removepublic CollectionMessageSequence(Collection<T> collection)
public int size()
MessageSequenceMessageSequence.UNKNOWN_SIZE,
if it is unknownpublic boolean hasNext()
MessageSequenceIterator.hasNext()public T next()
MessageSequenceMessageSequence.size() is not equal to
MessageSequence.UNKNOWN_SIZE, this means that this method may be invoked
approximately up to MessageSequence.size() times.Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.