com.plumtree.openfoundation.util
Interface IXPEnumerator

All Known Subinterfaces:
IXPDictionaryEnumerator
All Known Implementing Classes:
XPEnumerator

public interface IXPEnumerator

IXPEnumerator is the base interface for all enumerators. Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection. Initially, the enumerator is positioned before the first element in the collection. Reset also brings the enumerator back to this position. At this position, calling Current throws an exception. Therefore, you must call MoveNext to advance the enumerator to the first element of the collection before reading the value of Current.


Method Summary
 java.lang.Object GetCurrent()
          Gets the current element in the collection.
 boolean MoveNext()
          Advances the enumerator to the next element of the collection.
 

Method Detail

GetCurrent

public java.lang.Object GetCurrent()
Gets the current element in the collection.

Returns:
Current Object.

MoveNext

public boolean MoveNext()
Advances the enumerator to the next element of the collection. After the end of the collection is passed, subsequent calls to MoveNext return false until Reset is called. An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to MoveNext or Reset throws an XPInvalidOperationException.

Returns:
true if there it moved to next, else false.


Copyright © 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.