org.openanzo.util
Interface MutableIterator<T>

Type Parameters:
T - Type of object within iterator
All Superinterfaces:
java.util.Iterator<T>
All Known Implementing Classes:
CompositeIterator, NullIterator

public interface MutableIterator<T>
extends java.util.Iterator<T>

Extension of iterator that has a set method to replace the last element access via the iterator with a new value.

Author:
Lee Feigenbaum ( feigenbl@us.ibm.com )

Method Summary
 void set(T newVal)
          Replaces the last element accessed via the iterator (usually via .next()) with newVal.
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

set

void set(T newVal)
Replaces the last element accessed via the iterator (usually via .next()) with newVal.

Parameters:
newVal - The new value to replace for the previously accessed element in the iteration.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.