public class TapeSegment<T> extends Object
| Constructor and Description |
|---|
TapeSegment(int size,
T initialValue) |
| Modifier and Type | Method and Description |
|---|---|
TapeSegment<T> |
atBeginning() |
TapeSegment<T> |
atEnd() |
void |
moveBackward() |
void |
moveForward() |
protected void |
moveToIndex(int index) |
T |
read() |
void |
write(T value) |
public TapeSegment(int size,
T initialValue)
public TapeSegment<T> atBeginning()
public TapeSegment<T> atEnd()
public void moveForward()
throws OutOfTapeBoundsException
OutOfTapeBoundsExceptionpublic void moveBackward()
throws OutOfTapeBoundsException
OutOfTapeBoundsExceptionprotected void moveToIndex(int index)
public T read()
public void write(T value)
Copyright © 2018. All rights reserved.