org.tigris.scarab.util
Class SubsetIterator
java.lang.Object
org.tigris.scarab.util.SubsetIterator
- All Implemented Interfaces:
- java.util.Iterator
- Direct Known Subclasses:
- EmptySubsetIterator, SubsetIteratorWithSize
- public class SubsetIterator
- extends java.lang.Object
- implements java.util.Iterator
|
Constructor Summary |
SubsetIterator(java.util.Iterator i,
int offset)
Constructs an itarator on a subset of the given iterator.
|
SubsetIterator(java.util.Iterator i,
int offset,
int elements)
Constructs an itarator on a subset of the given iterator.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
public static final SubsetIterator EMPTY
firstCall
boolean firstCall
SubsetIterator
public SubsetIterator(java.util.Iterator i,
int offset,
int elements)
- Constructs an itarator on a subset of the given iterator.
The SubsetIterator starts with the offset-element and iterates
over
elements elements
- Parameters:
i - the Iterator to subsetoffset - the position of the first element of the subset
SubsetIterator
public SubsetIterator(java.util.Iterator i,
int offset)
- Constructs an itarator on a subset of the given iterator.
The SubsetIterator starts with the offset-element and iterates
over all elements
- Parameters:
i - the Iterator to subsetoffset - the position of the first element of the subset
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface java.util.Iterator
next
public java.lang.Object next()
- Specified by:
next in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove in interface java.util.Iterator
Copyright © 2000-2004 Tigris.org. All Rights Reserved.