zombie.util.list
Interface IntListIterator

All Superinterfaces:
IntIterator

public interface IntListIterator
extends IntIterator

This class represents iterators over lists of int values.

Since:
1.0
Version:
1.0 2002/29/12
Author:
Søren Bak
See Also:
ListIterator

Method Summary
 void add(int v)
          Adds a specified element to the list at this iterator's current position.
 boolean hasPrevious()
          Indicates whether more int values can be returned by this iterator by calling previous().
 int nextIndex()
          Returns the index of the element that would be returned by a call to next().
 int previous()
          Returns the previous int value of this iterator.
 int previousIndex()
          Returns the index of the element that would be returned by a call to previous().
 void set(int v)
          Sets the last element returned to a specified value.
 
Methods inherited from interface zombie.util.IntIterator
hasNext, next, remove
 

Method Detail

add

void add(int v)
Adds a specified element to the list at this iterator's current position.

Parameters:
v - the element to add.
Throws:
java.lang.UnsupportedOperationException - if addition is not supported by this iterator.

hasPrevious

boolean hasPrevious()
Indicates whether more int values can be returned by this iterator by calling previous().

Returns:
true if more int values can be returned by this iterator in backwards direction; returns false otherwise.
See Also:
previous()

nextIndex

int nextIndex()
Returns the index of the element that would be returned by a call to next().

Returns:
the index of the element that would be returned by a call to next().
See Also:
IntIterator.next()

previous

int previous()
Returns the previous int value of this iterator.

Returns:
the previous int value of this iterator.
Throws:
java.util.NoSuchElementException - if no more elements are available from this iterator in backwards direction.
See Also:
hasPrevious()

previousIndex

int previousIndex()
Returns the index of the element that would be returned by a call to previous().

Returns:
the index of the element that would be returned by a call to previous(); if no more elements are available in backwards direction, -1 is returned.
See Also:
previous()

set

void set(int v)
Sets the last element returned to a specified value.

Parameters:
v - the new value of the element.
Throws:
java.lang.UnsupportedOperationException - if replacement is not supported by this iterator.
java.lang.IllegalStateException - if no element has been returned by this iterator yet.