edu.umd.cfar.lamp.viper.util
Class AbstractCircularIterator

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.util.AbstractCircularIterator
All Implemented Interfaces:
CircularIterator, java.util.Iterator, java.util.ListIterator

public abstract class AbstractCircularIterator
extends java.lang.Object
implements CircularIterator

An abstract iterator that does not have an end, instead returning to the beginning. This class implements the empty circular iterator, and throws UnsupportedOperationExceptions when the change methods are invoked.


Constructor Summary
AbstractCircularIterator()
           
 
Method Summary
 void add(java.lang.Object o)
          Adds the value between current and next; unimplemented.
 boolean hasNext()
          Tests to see if there is another element.
 boolean hasPrevious()
          Tests to see if there is another element.
 void remove()
          Removes the current element; unimplemented.
 void set(java.lang.Object o)
          Sets the current element; unimplemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.umd.cfar.lamp.viper.util.CircularIterator
current, isEmpty
 
Methods inherited from interface java.util.ListIterator
next, nextIndex, previous, previousIndex
 

Constructor Detail

AbstractCircularIterator

public AbstractCircularIterator()
Method Detail

hasNext

public boolean hasNext()
Tests to see if there is another element.

Specified by:
hasNext in interface java.util.ListIterator
Returns:
true

hasPrevious

public boolean hasPrevious()
Tests to see if there is another element.

Specified by:
hasPrevious in interface java.util.ListIterator
Returns:
true

remove

public void remove()
Removes the current element; unimplemented.

Specified by:
remove in interface java.util.ListIterator
Throws:
java.lang.UnsupportedOperationException

set

public void set(java.lang.Object o)
Sets the current element; unimplemented.

Specified by:
set in interface java.util.ListIterator
Parameters:
o - the value to set to current
Throws:
java.lang.UnsupportedOperationException

add

public void add(java.lang.Object o)
Adds the value between current and next; unimplemented.

Specified by:
add in interface java.util.ListIterator
Parameters:
o - the value to add.
Throws:
java.lang.UnsupportedOperationException