orc.trace
Interface EventCursor

All Known Implementing Classes:
BackwardEventCursor, InputStreamEventCursor, WeakBackwardEventCursor

public interface EventCursor

Functional cursor in a stream of trace events. You'd probably implement this as a Zipper.

Author:
quark

Nested Class Summary
static class EventCursor.EndOfStream
           
 
Method Summary
 EventCursor backward()
          Return a cursor to the previous event in the stream.
 Event current()
          Return the current event in the stream.
 EventCursor forward()
          Return a cursor to the next event in the stream.
 

Method Detail

current

Event current()
Return the current event in the stream.


forward

EventCursor forward()
                    throws EventCursor.EndOfStream
Return a cursor to the next event in the stream. Why "forward" instead of "next"? To avoid confusion with the temporal logic "next" operator which evaluates a predicate at the next location. Also because I prefer the symmetry of forward/backward to next/previous.

Throws:
EventCursor.EndOfStream

backward

EventCursor backward()
                     throws EventCursor.EndOfStream
Return a cursor to the previous event in the stream.

Throws:
EventCursor.EndOfStream