|
JIVE Platform Release 0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InteractiveContourModel
Identifies a contour model that supports forward and reverse program execution.
An interactive contour model will throw an exception if the client tries to modify the state of the contour model while stepping back through previous states.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.bsu.cs.jive.contour.ContourModel |
---|
ContourModel.Exporter, ContourModel.Importer, ContourModel.Listener, ContourModel.Visitor |
Method Summary | |
---|---|
boolean |
canStepBackward()
Returns true if this interactive contour model can step backwards. |
boolean |
canStepForwardThroughRecordedStates()
Returns true if this interactive contour model can step forward through pre-recorded states. |
int |
countTransactions()
Count the number of transactions in this interactive contour model. |
long |
getEventNumber(int transactionIndex)
Returns the number of the event which initiated the transaction identified by the supplied index. |
int |
getNextTransactionIndex()
Get the index of the next transaction, the transaction that would be played if we call stepForward() . |
int |
getPrevTransactionIndex()
Get the index of the previous transaction, the transaction that would be played if we call stepBackward() . |
int |
getTransactionIndex(long eventNumber)
Returns the index of the transaction created as a result of the event with the supplied event number. |
boolean |
readyToRecord()
Indicates if this object is in a state that is ready to record a transaction. |
void |
stepBackward()
Play a step-backward transaction. |
void |
stepForward()
Play a step-forward transaction. |
Methods inherited from interface edu.bsu.cs.jive.contour.ContourModel |
---|
addListener, contains, contains, countChildren, countChildren, export, getChildren, getChildren, getChildren, getChildren, getContour, getModelLock, getParent, getParent, getRoots, getRoots, removeListener, size, visitBreadthFirst, visitDepthFirst |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Method Detail |
---|
int countTransactions()
void stepForward() throws NoSuchElementException
This is a synchronous method: when it returns, the stepping backward has completed. (Do not confuse this with a synchronized method.)
NoSuchElementException
- if there is no forward step to be
executed.void stepBackward() throws NoSuchElementException, IndexOutOfBoundsException
This is a synchronous method: when it returns, the stepping backward has completed. (Do not confuse this with a synchronized method.)
NoSuchElementException
- if the step backwards cannot be
completed because that information is either not available (not
cached).
IndexOutOfBoundsException
- if the request was to move
back from the initial state (state zero).int getNextTransactionIndex()
stepForward()
.
NoSuchElementException
- if there is no recorded "next"
transaction that can be committed.int getPrevTransactionIndex()
stepBackward()
.
NoSuchElementException
- if there is no recorded "previous
transaction that can be rolled back.boolean readyToRecord()
boolean canStepBackward()
boolean canStepForwardThroughRecordedStates()
readyToRecord()
int getTransactionIndex(long eventNumber)
eventNumber
- the event resulting in the transaction
NoSuchElementException
- if there is no such transactionlong getEventNumber(int transactionIndex)
transactionIndex
- the transaction index resulting from the event number
|
JIVE Platform Release 0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |