summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java b/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java
index 7c1e404..37e4b1f 100644
--- a/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java
+++ b/core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java
@@ -18,6 +18,26 @@ public class ArrayListIt<E> extends ArrayList<E> implements Iterator, Iterable<E
super(n);
}
+ public void push(E e)
+ {
+ add(e);
+ }
+
+ public E pop()
+ {
+ return remove(size() - 1);
+ }
+
+ public void enqueue(E e)
+ {
+ add(e);
+ }
+
+ public E dequeue()
+ {
+ return remove(0);
+ }
+
@Override
@SuppressWarnings("unchecked")
public Iterator<E> iterator()