|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsims.mdt.Tape
public class Tape
Field Summary |
---|
Fields inherited from interface sims.mdt.Errors |
---|
error1, error10, error11, error12, error13, error2, error3, error4, error5, error6, error7, error8, error9 |
Constructor Summary | |
---|---|
Tape(int number,
java.util.HashMap h,
Alphabet a)
constructor for any tape except the first |
|
Tape(java.lang.String word,
java.util.HashMap h,
Alphabet a)
constructor for the first tape (number zero). |
Method Summary | |
---|---|
java.lang.Object |
clone()
redefinition needed to clone a Tape |
Alphabet |
getAlpha()
|
java.lang.Character |
getAlphaLetter(int i)
|
int |
getAlphaSize()
|
int |
getMin()
|
int |
getScannedSquare()
|
java.lang.Character |
getScannedSymbol()
|
int |
getSpace()
|
java.lang.String |
getStatus()
|
java.lang.String |
getTapeContent()
|
java.lang.String |
getWord()
|
boolean |
inAlphabet(java.lang.Character c)
|
void |
setAlpha(int i,
char c)
Add a letter to this tape's alphabet. |
void |
setTapeContent(java.lang.String s)
set the tape content, from its current min, as the specified String |
void |
setTapeStatus(java.util.HashMap rub)
Set the tape content as the parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tape(java.lang.String word, java.util.HashMap h, Alphabet a)
h
- the hash table containing the tapes alphabetsa
- the alphabet of the machineword
- the entry wordpublic Tape(int number, java.util.HashMap h, Alphabet a)
h
- the hash table containing the tapes alphabetsa
- the alphabet of the machinenumber
- this tape's number.Method Detail |
---|
public boolean inAlphabet(java.lang.Character c)
c
- the character we want to test.
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void setTapeStatus(java.util.HashMap rub)
rub
- a hash table describing a tape, taking as key an index value (signed Integer)public java.lang.Character getScannedSymbol()
public int getScannedSquare()
public int getMin()
public java.lang.String getWord()
public java.lang.String getTapeContent()
public java.lang.String getStatus()
public int getSpace()
public java.lang.Character getAlphaLetter(int i)
public Alphabet getAlpha()
public int getAlphaSize()
public void setAlpha(int i, char c)
i
- the index where to place the letter.c
- the letter to add.public void setTapeContent(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |