diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/util/ArrayListIt.java | 20 |
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() |