turingmachine
Class CTMDataTransition

java.lang.Object
  extended by turingmachine.CTMData
      extended by turingmachine.CTMDataTransition
All Implemented Interfaces:
java.io.Serializable

class CTMDataTransition
extends CTMData
implements java.io.Serializable

Data for the transition on a link between states.


Field Summary
private  java.lang.String direction
          Direction to go after match, or the replace symbol.
(package private) static long serialVersionUID
          Serial id, so future version will load old files
private  java.lang.String symbol
          Symbol to match.
 
Constructor Summary
CTMDataTransition(CTMDocument document, CTMDataLink dataLink)
          Constructor.
 
Method Summary
 void delete()
          Delete this transition from its parent link.
 java.lang.String getDirection()
          Get the direction or replace symbol.
 java.lang.String getMatch()
          Get the match symbol.
 boolean setDirection(java.lang.String direction)
          Get the direction, or replace symbol.
 boolean setSymbol(java.lang.String symbol)
          Set the match symbol.
 
Methods inherited from class turingmachine.CTMData
getDataParent, getDocument, getModificationCount, isDeleted, touch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Serial id, so future version will load old files

See Also:
Constant Field Values

symbol

private java.lang.String symbol
Symbol to match.


direction

private java.lang.String direction
Direction to go after match, or the replace symbol.

Constructor Detail

CTMDataTransition

public CTMDataTransition(CTMDocument document,
                         CTMDataLink dataLink)
Constructor.

Parameters:
document - Document this data transition belongs to.
dataLink - The link this data transition belongs to.
Method Detail

setSymbol

public boolean setSymbol(java.lang.String symbol)
Set the match symbol.

Parameters:
symbol - The match symbol.
Returns:
true if the symbol was valid else false.

getMatch

public java.lang.String getMatch()
Get the match symbol.

Returns:
The match symbol.

setDirection

public boolean setDirection(java.lang.String direction)
Get the direction, or replace symbol.

Parameters:
direction - The direction or replace symbol to set.
Returns:
true if the direction/replace symbol was valid else false.

delete

public void delete()
Delete this transition from its parent link.

Overrides:
delete in class CTMData

getDirection

public java.lang.String getDirection()
Get the direction or replace symbol.

Returns:
The direction or replace symbol.