org.deckfour.xes.model.buffered
Class XTraceIterator

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

public class XTraceIterator
extends Object
implements 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 Iterator<XEvent>
Specified by:
hasNext in interface ListIterator<XEvent>

next

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

remove

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

add

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

hasPrevious

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

nextIndex

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

previous

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

previousIndex

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

set

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