Package org.apache.commons.discovery
Interface ResourceNameIterator
- All Known Implementing Classes:
ResourceClassIterator
,ResourceIterator
public interface ResourceNameIterator
Iterate over resource names.
The semantics are somewhat unusual, for better or worse.
hasNext is presumed to be destructive to the current state,
each call will 'move' the cursor.
nextResourceName() MUST BE non-destructive,
it does not change the state.
TODO: FIX iterator logic/semantics, possibly add 'currentResourceName()'.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Returns true if the iteration has more elements.nextResourceName() returns the name of the next resource, and MUST be non-destructive.
-
Method Details
-
hasNext
boolean hasNext()Returns true if the iteration has more elements.- Returns:
- true if the iterator has more elements, false otherwise
-
nextResourceName
nextResourceName() returns the name of the next resource, and MUST be non-destructive. Repeated calls- Returns:
- The next resource name in the iteration
-