java.lang.Object
org.gjt.sp.jedit.bsh.collection.CollectionIterator
- All Implemented Interfaces:
BshIterator
This is the implementation of:
BshIterator - a dynamically loaded extension that supports the collections
API supported by JDK1.2 and greater.
- Author:
- Daniel Leuck, Pat Niemeyer
-
Constructor Summary
ConstructorDescriptionCollectionIterator
(Object iterateOverMe) Construct a basic CollectionIterator -
Method Summary
-
Constructor Details
-
CollectionIterator
Construct a basic CollectionIterator- Parameters:
iterateOverMe
- The object over which we are iterating- Throws:
IllegalArgumentException
- If the argument is not a supported (i.e. iterable) type.NullPointerException
- If the argument is null
-
-
Method Details
-
createIterator
Create an iterator over the given object- Parameters:
iterateOverMe
- Object of type Iterator, Collection, or types supported by CollectionManager.BasicBshIterator- Returns:
- an Iterator
- Throws:
IllegalArgumentException
- If the argument is not a supported (i.e. iterable) type.NullPointerException
- If the argument is null
-
next
Fetch the next object in the iteration- Specified by:
next
in interfaceBshIterator
- Returns:
- The next object
-
hasNext
public boolean hasNext()Returns true if and only if there are more objects available via thenext()
method- Specified by:
hasNext
in interfaceBshIterator
- Returns:
- The next object
-