Class TED5tuple

java.lang.Object
  |
  +--TED5tuple

public class TED5tuple
extends java.lang.Object

TED5Tuple.java This class simulates a 5-Tuple in a Turing Machine. The 5 Data fields are: Initial State: The state you are in. Final State: The state you will transition to. Character Read: The character at the current position of the tape head. Character to be Written: The character to be written at the position of the tape head. Direction to move: Direction in which to move the tape head. Copyright 2005 Ben Pfistner and Jason Emmons


Constructor Summary
TED5tuple()
           
 
Method Summary
 char getDirection()
          getDirection()
 java.lang.String getFinalState()
          getFinalState()
 java.lang.String getInitialState()
          getInitialState()
 char getReadChar()
          getReadChar()
 char getWriteChar()
          getWriteChar()
static void main(java.lang.String[] args)
           
 void setDirection(char direction)
          setDirection()
 void setFinalState(java.lang.String state)
          setFinalState()
 void setInitialState(java.lang.String state)
          setInitialState()
 void setReadChar(char read)
          setReadChar()
 void setWriteChar(char write)
          setWriteChar()
 java.lang.String toString()
          toString() This method tells a 5tuple how to write itself out as a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TED5tuple

public TED5tuple()
Method Detail

setInitialState

public void setInitialState(java.lang.String state)
setInitialState()
Parameters:
the - state we are currently in

getInitialState

public java.lang.String getInitialState()
getInitialState()
Returns:
the state we are currently in

setFinalState

public void setFinalState(java.lang.String state)
setFinalState()
Parameters:
the - state we will transition to from this 5-Tuple

getFinalState

public java.lang.String getFinalState()
getFinalState()
Returns:
the next state

setReadChar

public void setReadChar(char read)
setReadChar()
Parameters:
the - character we read

getReadChar

public char getReadChar()
getReadChar()
Returns:
the character to be read

setWriteChar

public void setWriteChar(char write)
setWriteChar()
Parameters:
the - charcter to be written

getWriteChar

public char getWriteChar()
getWriteChar()
Returns:
the character to be written

setDirection

public void setDirection(char direction)
setDirection()
Parameters:
the - direction for this

getDirection

public char getDirection()
getDirection()
Returns:
the direction

toString

public java.lang.String toString()
toString() This method tells a 5tuple how to write itself out as a string
Overrides:
toString in class java.lang.Object
Returns:
the entire 5tuple as a string

main

public static void main(java.lang.String[] args)