public class PartitionedMessageSequence<Q> extends Object implements MessageSequence<Collection<Q>>
MessageSequence wrapper that partitions the wrapped sequence in collections of the specified size.UNKNOWN_SIZE| Constructor and Description |
|---|
PartitionedMessageSequence(MessageSequence<Q> seq,
int groupSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Whether this sequence has more elements.
|
boolean |
isEmpty()
If the sequence is empty
|
Collection<Q> |
next()
The next element of the sequence.
|
void |
remove()
Unsupported operation.
|
Integer |
size()
The number of members of the sequence.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic PartitionedMessageSequence(MessageSequence<Q> seq, int groupSize)
public Integer size()
MessageSequencesize in interface MessageSequence<Collection<Q>>MessageSequence.UNKNOWN_SIZE, if it is unknownpublic boolean hasNext()
MessageSequencehasNext in interface Iterator<Collection<Q>>hasNext in interface MessageSequence<Collection<Q>>Iterator.hasNext()public Collection<Q> next()
MessageSequenceMessageSequence.size() is not equal to MessageSequence.UNKNOWN_SIZE, this means that
this method may be invoked approximately up to MessageSequence.size() times.next in interface Iterator<Collection<Q>>next in interface MessageSequence<Collection<Q>>public boolean isEmpty()
MessageSequenceisEmpty in interface MessageSequence<Collection<Q>>public void remove()
MessageSequenceMessageSequence do not allow removal of elements.remove in interface Iterator<Collection<Q>>remove in interface MessageSequence<Collection<Q>>Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.