diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2017-10-11 13:41:07 -0300 |
| commit | 946cab444bc301d8a7c756a1bab039558288de89 (patch) | |
| tree | 419f27c39a509bcd83cae0e6630be8eb7ff95a30 /base/src/main/java/bjc/utils/esodata/Tape.java | |
| parent | c82e3b3b2de0633317ec8fc85925e91422820597 (diff) | |
Cleanup work
Diffstat (limited to 'base/src/main/java/bjc/utils/esodata/Tape.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/esodata/Tape.java | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/base/src/main/java/bjc/utils/esodata/Tape.java b/base/src/main/java/bjc/utils/esodata/Tape.java index b6a2c01..dab027f 100644 --- a/base/src/main/java/bjc/utils/esodata/Tape.java +++ b/base/src/main/java/bjc/utils/esodata/Tape.java @@ -8,7 +8,7 @@ package bjc.utils.esodata; * unbounded to the right, but in practice bounded by available memory. * * @param <T> - * The element type of the tape. + * The element type of the tape. * * @author bjculkin */ @@ -16,7 +16,8 @@ public interface Tape<T> { /** * Get the item the tape is currently on. * - * @return The item the tape is on. + * @return + * The item the tape is on. */ T item(); @@ -24,21 +25,23 @@ public interface Tape<T> { * Set the item the tape is currently on. * * @param itm - * The new value for the tape item. + * The new value for the tape item. */ void item(T itm); /** * Get the current number of elements in the tape. * - * @return The current number of elements in the tape. + * @return + * The current number of elements in the tape. */ int size(); /** * Get the position of the current item. * - * @return The position of the current item. + * @return + * The position of the current item. */ int position(); @@ -46,7 +49,7 @@ public interface Tape<T> { * Insert an element before the current item. * * @param itm - * The item to add. + * The item to add. */ void insertBefore(T itm); @@ -54,7 +57,7 @@ public interface Tape<T> { * Insert an element after the current item. * * @param itm - * The item to insert. + * The item to insert. */ void insertAfter(T itm); @@ -64,18 +67,15 @@ public interface Tape<T> { * Also moves the cursor back one step if possible to maintain relative * position. * - * @return The removed item. + * @return + * The removed item. */ T remove(); - /** - * Move the cursor to the left-most position. - */ + /** Move the cursor to the left-most position. */ void first(); - /** - * Move the cursor the right-most position. - */ + /** Move the cursor to the right-most position. */ void last(); /** @@ -83,7 +83,8 @@ public interface Tape<T> { * * The cursor can't go past zero. * - * @return True if the cursor was moved left. + * @return + * True if the cursor was moved left. */ boolean left(); @@ -94,16 +95,18 @@ public interface Tape<T> { * that would exceed zero don't move the cursor at all. * * @param amt - * The amount to attempt to move the cursor left. + * The amount to attempt to move the cursor left. * - * @return True if the cursor was moved left. + * @return + * True if the cursor was moved left. */ boolean left(int amt); /** * Move the cursor one space right. * - * @return Whether the cursor was moved right. + * @return + * Whether the cursor was moved right. */ boolean right(); @@ -111,16 +114,18 @@ public interface Tape<T> { * Move the cursor the specified amount right. * * @param amt - * The amount to move the cursor right by. + * The amount to move the cursor right by. * - * @return Whether the cursor was moved right. + * @return + * Whether the cursor was moved right. */ boolean right(int amt); /** * Is this tape double sided? * - * @return Whether or not this tape is double-sided. + * @return + * Whether or not this tape is double-sided. */ boolean isDoubleSided(); } |
