org.deckfour.xes.model.buffered
Class XTraceIterator

java.lang.Object
  extended by org.deckfour.xes.model.buffered.XTraceIterator
All Implemented Interfaces:
java.util.Iterator<XEvent>, java.util.ListIterator<XEvent>

public class XTraceIterator
extends java.lang.Object
implements java.util.ListIterator<XEvent>

This class implements an iterator over the buffered implementation for the XTrace interface.

Author:
Christian W. Guenther (christian@deckfour.org)
See Also:
Iterator

Field Summary
protected  XTraceBufferedImpl list
          The trace to be iterated over.
protected  int position
          Current position of the iterator.
 
Constructor Summary
XTraceIterator(XTraceBufferedImpl aList)
          Constructs a new iterator on the specified XTraceBufferedImpl.
XTraceIterator(XTraceBufferedImpl aList, int aPosition)
          Constructs a new iterator on the specified XTraceBufferedImpl.
 
Method Summary
 void add(XEvent o)
           
 boolean hasNext()
           
 boolean hasPrevious()
           
 XEvent next()
           
 int nextIndex()
           
 XEvent previous()
           
 int previousIndex()
           
 void remove()
           
 void set(XEvent o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected XTraceBufferedImpl list
The trace to be iterated over.


position

protected int position
Current position of the iterator.

Constructor Detail

XTraceIterator

public XTraceIterator(XTraceBufferedImpl aList)
Constructs a new iterator on the specified XTraceBufferedImpl.

Parameters:
aList - XTraeBufferedImpl, over which the created iterator iterates.

XTraceIterator

public XTraceIterator(XTraceBufferedImpl aList,
                      int aPosition)
Constructs a new iterator on the specified XTraceBufferedImpl.

Parameters:
aList - XTraeBufferedImpl, over which the created iterator iterates.
aPosition - The starting position of the iterator.
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<XEvent>
Specified by:
hasNext in interface java.util.ListIterator<XEvent>

next

public XEvent next()
Specified by:
next in interface java.util.Iterator<XEvent>
Specified by:
next in interface java.util.ListIterator<XEvent>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<XEvent>
Specified by:
remove in interface java.util.ListIterator<XEvent>

add

public void add(XEvent o)
Specified by:
add in interface java.util.ListIterator<XEvent>

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface java.util.ListIterator<XEvent>

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface java.util.ListIterator<XEvent>

previous

public XEvent previous()
Specified by:
previous in interface java.util.ListIterator<XEvent>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface java.util.ListIterator<XEvent>

set

public void set(XEvent o)
Specified by:
set in interface java.util.ListIterator<XEvent>