summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/esodata/DoubleTape.java
diff options
context:
space:
mode:
authorbjculkin <bjculkin@mix.wvu.edu>2018-02-12 22:45:04 -0500
committerbjculkin <bjculkin@mix.wvu.edu>2018-02-12 22:45:04 -0500
commitdf94066e3af02ff02d5ab4d033a3d603f743234c (patch)
tree168a1edaf58d386c175ffb601e9d4da8e13d31e2 /base/src/main/java/bjc/utils/esodata/DoubleTape.java
parentae51c587c53f7ca311e556e3cbd0c5566d6c2843 (diff)
Formatting pass
Diffstat (limited to 'base/src/main/java/bjc/utils/esodata/DoubleTape.java')
-rw-r--r--base/src/main/java/bjc/utils/esodata/DoubleTape.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/base/src/main/java/bjc/utils/esodata/DoubleTape.java b/base/src/main/java/bjc/utils/esodata/DoubleTape.java
index a0031ec..bfc58a4 100644
--- a/base/src/main/java/bjc/utils/esodata/DoubleTape.java
+++ b/base/src/main/java/bjc/utils/esodata/DoubleTape.java
@@ -20,15 +20,15 @@ package bjc.utils.esodata;
* Flip refers to the entire tape for 'obvious' reasons.
*
* @param <T>
- * The element type of the tape.
+ * The element type of the tape.
*
* @author bjculkin
*/
public class DoubleTape<T> implements Tape<T> {
/* The front-side of the tape. */
- private Tape<T> front;
+ private Tape<T> front;
/* The back-side of the tape. */
- private Tape<T> back;
+ private Tape<T> back;
/** Create a new empty double-sided tape that doesn't autoextend. */
public DoubleTape() {
@@ -40,7 +40,7 @@ public class DoubleTape<T> implements Tape<T> {
* auto-extension policy.
*
* @param autoExtnd
- * Whether or not to auto-extend the tape to the right w/ nulls.
+ * Whether or not to auto-extend the tape to the right w/ nulls.
*/
public DoubleTape(final boolean autoExtnd) {
front = new SingleTape<>(autoExtnd);
@@ -107,7 +107,7 @@ public class DoubleTape<T> implements Tape<T> {
public boolean left(final int amt) {
final boolean succ = front.left(amt);
- if (succ) {
+ if(succ) {
back.right(amt);
}
@@ -123,7 +123,7 @@ public class DoubleTape<T> implements Tape<T> {
public boolean right(final int amt) {
final boolean succ = front.right(amt);
- if (succ) {
+ if(succ) {
back.left(amt);
}
@@ -160,19 +160,19 @@ public class DoubleTape<T> implements Tape<T> {
@Override
public boolean equals(final Object obj) {
- if (this == obj) return true;
- if (obj == null) return false;
- if (!(obj instanceof DoubleTape<?>)) return false;
+ if(this == obj) return true;
+ if(obj == null) return false;
+ if(!(obj instanceof DoubleTape<?>)) return false;
final DoubleTape<?> other = (DoubleTape<?>) obj;
- if (back == null) {
- if (other.back != null) return false;
- } else if (!back.equals(other.back)) return false;
+ if(back == null) {
+ if(other.back != null) return false;
+ } else if(!back.equals(other.back)) return false;
- if (front == null) {
- if (other.front != null) return false;
- } else if (!front.equals(other.front)) return false;
+ if(front == null) {
+ if(other.front != null) return false;
+ } else if(!front.equals(other.front)) return false;
return true;
}