org.mule.routing
Interface MessageSequence<T>

Type Parameters:
T - the message payload type
All Superinterfaces:
Iterator<T>
All Known Implementing Classes:
AbstractMessageSequence, ArrayMessageSequence, CollectionMessageSequence, IteratorMessageSequence, PartitionedMessageSequence

public interface MessageSequence<T>
extends Iterator<T>

A sequence of messages

Author:
flbulgarelli

Field Summary
static int UNKNOWN_SIZE
           
 
Method Summary
 boolean hasNext()
          Whether this sequence has more elements.
 boolean isEmpty()
          If the sequence is empty
 T next()
          The next element of the sequence.
 void remove()
          Unsupported operation.
 int size()
          The number of members of the sequence.
 

Field Detail

UNKNOWN_SIZE

static final int UNKNOWN_SIZE
See Also:
Constant Field Values
Method Detail

isEmpty

boolean isEmpty()
If the sequence is empty

Returns:
!hasNext()

size

int size()
The number of members of the sequence. If this is unknown, return UNKNOWN_ELEMENTS_COUNT.

Returns:
The estimated size of the sequence, or UNKNOWN_SIZE, if it is unknown

hasNext

boolean hasNext()
Whether this sequence has more elements.

Specified by:
hasNext in interface Iterator<T>
See Also:
Iterator.hasNext()

next

T next()
The next element of the sequence. At any moment, if size() is not equal to UNKNOWN_SIZE, this means that this method may be invoked approximately up to size() times.

Specified by:
next in interface Iterator<T>

remove

void remove()
Unsupported operation. MessageSequence do not allow removal of elements.

Specified by:
remove in interface Iterator<T>


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.