Package org.jgroups.util
Class MessageBatch.BatchIterator
- java.lang.Object
-
- org.jgroups.util.MessageBatch.BatchIterator
-
- All Implemented Interfaces:
java.util.Iterator<Message>,MessageIterator
- Enclosing class:
- MessageBatch
protected class MessageBatch.BatchIterator extends java.lang.Object implements MessageIterator
Iterates over non-null elements of a batch, skipping null elements
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrent_indexprotected intsaved_index
-
Constructor Summary
Constructors Constructor Description BatchIterator(int saved_index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Messagenext()voidremove()voidreplace(Message msg)Replaces the message at the current index with msg
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<Message>
-
remove
public void remove()
- Specified by:
removein interfacejava.util.Iterator<Message>
-
replace
public void replace(Message msg)
Description copied from interface:MessageIteratorReplaces the message at the current index with msg- Specified by:
replacein interfaceMessageIterator
-
-