Interface dkIterator
-
- All Known Subinterfaces:
- DKSequentialIterator
- All Known Implementing Classes:
- DKSegmentedPartsIterator
public interface dkIteratorBase interface for iterating over elements in a CM8 collection.This interface provides the fundamental operations for traversing collections in a forward direction. Iterators maintain a current position within the collection and allow sequential access to elements.
Implementations of this interface are used throughout the CM8 API to provide consistent iteration patterns across different collection types.
- See Also:
DKSequentialIterator,dkCollection
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanmore()Checks if there are more elements available in the collection.java.lang.Objectnext()Returns the next element in the collection and advances the iterator position.voidreset()Resets the iterator to its initial position.
-
-
-
Method Detail
-
reset
void reset()
Resets the iterator to its initial position.After calling this method, the iterator is positioned before the first element, and a call to
next()will return the first element in the collection.
-
next
java.lang.Object next() throws DKUsageErrorReturns the next element in the collection and advances the iterator position.This method retrieves the current element and moves the iterator forward to the next position. If there are no more elements, the behavior depends on the implementation.
- Returns:
- the next element in the collection
- Throws:
DKUsageError- if there are no more elements or an error occurs during iteration
-
more
boolean more()
Checks if there are more elements available in the collection.This method can be used to test whether a call to
next()will succeed without throwing an exception.- Returns:
- true if there are more elements to iterate over, false otherwise
-
-