public abstract class AbstractInfiniteTape<T> extends Object implements Tape<T>
| Constructor and Description |
|---|
AbstractInfiniteTape() |
| Modifier and Type | Method and Description |
|---|---|
protected TapeSegment<T> |
createNextSegment() |
protected abstract TapeSegment<T> |
createSegment() |
protected TapeSegment<T> |
getOrCreateNextSegment() |
TapeSegment<T> |
getOrCreatePreviousSegment() |
void |
moveBackward() |
void |
moveForward() |
protected T |
read() |
protected void |
write(T value) |
public void moveForward()
throws OutOfTapeBoundsException
moveForward in interface Tape<T>OutOfTapeBoundsExceptionprotected TapeSegment<T> getOrCreateNextSegment()
protected TapeSegment<T> createNextSegment()
public void moveBackward()
throws OutOfTapeBoundsException
moveBackward in interface Tape<T>OutOfTapeBoundsExceptionpublic TapeSegment<T> getOrCreatePreviousSegment()
protected abstract TapeSegment<T> createSegment()
protected T read()
Copyright © 2018. All rights reserved.