jdsl.core.ref
Class  ArrayLocatorIterator
java.lang.Object
  |
  +--jdsl.core.ref.AbstractArrayIterator
        |
        +--jdsl.core.ref.ArrayLocatorIterator
- All Implemented Interfaces: 
 - LocatorIterator, ObjectIterator
 
- public class ArrayLocatorIterator
- extends AbstractArrayIterator
- implements LocatorIterator
   
An array-based locator iterator.
- Version: 
 - $Id: ArrayLocatorIterator.java,v 1.5 2000/11/05 23:01:28 lv Exp $
 
- Author: 
 - Luca Vismara (lv)
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
 
locArray_
protected Locator[] locArray_
ArrayLocatorIterator
public ArrayLocatorIterator(Locator[] array)
- Uses the array to store the elements that this iterator
 traverses.  The array is NOT copied.
- Parameters:
 array - The elements that this iterator should traverse.
 
 
ArrayLocatorIterator
public ArrayLocatorIterator(Locator[] array,
                            int num)
                     throws BoundaryViolationException
- Traverses through the array, which is not copied, until
 num elements have been returned.
 
locator
public Locator locator()
                throws java.util.NoSuchElementException
- Specified by: 
 locator in interface LocatorIterator
 
- Following copied from interface: 
jdsl.core.api.LocatorIterator 
- Returns:
 - The locator returned by the most recent next()
 - Throws:
 java.util.NoSuchElementException - When the iterator is in its
 initial, before-the-first-locator state
 
key
public java.lang.Object key()
                     throws java.util.NoSuchElementException
- Description copied from interface: 
LocatorIterator 
- Shortcut for locator().key()
- Specified by: 
 key in interface LocatorIterator
 
- Following copied from interface: 
jdsl.core.api.LocatorIterator 
- Returns:
 - Key of the locator that would be returned by locator()
 - Throws:
 java.util.NoSuchElementException - When the iterator is in its
 initial, before-the-first-locator state
 
 
nextLocator
public Locator nextLocator()
                    throws java.util.NoSuchElementException
- Specified by: 
 nextLocator in interface LocatorIterator
 
- Following copied from interface: 
jdsl.core.api.LocatorIterator 
- Returns:
 - Next locator to consider
 - Throws:
 java.util.NoSuchElementException - if iterator has moved past
 the last locator