Class 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 Detail

      • 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>