orc.trace
Class InputStreamEventCursor

java.lang.Object
  extended by orc.trace.InputStreamEventCursor
All Implemented Interfaces:
EventCursor

public class InputStreamEventCursor
extends java.lang.Object
implements EventCursor


Nested Class Summary
 
Nested classes/interfaces inherited from interface orc.trace.EventCursor
EventCursor.EndOfStream
 
Constructor Summary
InputStreamEventCursor(java.io.InputStream in)
           
 
Method Summary
 InputStreamEventCursor backward()
          Return a cursor to the previous event in the stream.
 Event current()
          Return the current event in the stream.
 InputStreamEventCursor forward()
          Return a cursor to the next event in the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStreamEventCursor

public InputStreamEventCursor(java.io.InputStream in)
                       throws java.io.IOException
Throws:
java.io.IOException
Method Detail

current

public Event current()
Description copied from interface: EventCursor
Return the current event in the stream.

Specified by:
current in interface EventCursor

forward

public InputStreamEventCursor forward()
                               throws EventCursor.EndOfStream
Description copied from interface: EventCursor
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.

Specified by:
forward in interface EventCursor
Throws:
EventCursor.EndOfStream

backward

public InputStreamEventCursor backward()
                                throws EventCursor.EndOfStream
Description copied from interface: EventCursor
Return a cursor to the previous event in the stream.

Specified by:
backward in interface EventCursor
Throws:
EventCursor.EndOfStream