diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-04-07 21:03:53 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-04-07 21:03:53 -0400 |
| commit | 002516bd03b2ea3f731c8139c9a5f716902ab702 (patch) | |
| tree | 4b45260e0b411dd070ae5d2f45e8f2795bf91b79 /base/src/main/java/bjc/utils/data/ArrayIterator.java | |
| parent | d6afd99961aacd6ce915629773723cb6c6e145a7 (diff) | |
Finish remove utils.data
utils.data now lives in the esodata project; not in this one
Diffstat (limited to 'base/src/main/java/bjc/utils/data/ArrayIterator.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/ArrayIterator.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/base/src/main/java/bjc/utils/data/ArrayIterator.java b/base/src/main/java/bjc/utils/data/ArrayIterator.java deleted file mode 100644 index 1592901..0000000 --- a/base/src/main/java/bjc/utils/data/ArrayIterator.java +++ /dev/null @@ -1,39 +0,0 @@ -package bjc.utils.data; - -import java.util.Iterator; -/** - * Represents an iterator over an array of values. - * - * @param <T> The type of values in the array. - * - * @author Ben Culkin - */ -public class ArrayIterator<T> implements Iterator<T> { - private Object[] arr; - private int idx; - - /** - * Create a new array iterator. - * - * @param elms - * The array that will be iterated over. - */ - @SafeVarargs - public ArrayIterator(T... elms) { - arr = elms; - idx = 0; - } - - @Override - public boolean hasNext() { - return idx < arr.length; - } - - @SuppressWarnings("unchecked") - @Override - public T next() { - if (idx >= arr.length) return null; - - return (T)(arr[idx++]); - } -} |
