Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scopemvc.model.util
Class IntIndexSelectorIterator  view IntIndexSelectorIterator download IntIndexSelectorIterator.java

java.lang.Object
  extended byorg.scopemvc.model.util.IntIndexSelectorIterator
All Implemented Interfaces:
java.util.Iterator

public final class IntIndexSelectorIterator
extends java.lang.Object
implements java.util.Iterator

An Iterator that iterates between a range of IntIndexSelectors. Construct with a start and end index: the iterator steps over this sequence inclusive. ie (0, 0) gives a 0 Selector, but (0, -1) gives no Selector.

Note: the Selectors returned must be treated as immutable: it is the same Selector.

Version:
$Revision: 1.4 $ $Date: 2002/01/26 09:46:20 $

Field Summary
private  int currentIndex
           
private  org.scopemvc.core.IntIndexSelector currentSelector
           
private  int endIndex
           
private  int startIndex
           
 
Constructor Summary
IntIndexSelectorIterator(int inStartIndex, int inEndIndex)
           
 
Method Summary
 boolean hasNext()
          Tests whether there are elements remaining in the collection.
 java.lang.Object next()
          Obtain the next element in the collection.
 void remove()
          Remove from the underlying collection the last element returned by next (optional operation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startIndex

private int startIndex

endIndex

private int endIndex

currentIndex

private int currentIndex

currentSelector

private org.scopemvc.core.IntIndexSelector currentSelector
Constructor Detail

IntIndexSelectorIterator

public IntIndexSelectorIterator(int inStartIndex,
                                int inEndIndex)
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: java.util.Iterator
Tests whether there are elements remaining in the collection. In other words, calling next() will not throw an exception.

Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Description copied from interface: java.util.Iterator
Obtain the next element in the collection.

Specified by:
next in interface java.util.Iterator

remove

public void remove()
Description copied from interface: java.util.Iterator
Remove from the underlying collection the last element returned by next (optional operation). This method can be called only once after each call to next(). It does not affect what will be returned by subsequent calls to next.

Specified by:
remove in interface java.util.Iterator