diff options
author | SimonIT <simonit.orig@gmail.com> | 2019-12-16 10:41:07 +0100 |
---|---|---|
committer | SimonIT <simonit.orig@gmail.com> | 2019-12-16 10:41:07 +0100 |
commit | e44b67037440ff27c77aa2d5917609de425b1054 (patch) | |
tree | 354bc84a6172ef6ff41598a36340a73ef6d38440 /core | |
parent | 59f347809d6b6374431ad02847b67adcb065f56e (diff) | |
download | gdx-boardgame-e44b67037440ff27c77aa2d5917609de425b1054.zip gdx-boardgame-e44b67037440ff27c77aa2d5917609de425b1054.tar.gz |
fix Iterator generic in Collection
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/utils/Collection.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/utils/IterableArray.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/utils/Collection.java b/core/src/ch/asynk/gdx/boardgame/utils/Collection.java index b546217..220e4c7 100644 --- a/core/src/ch/asynk/gdx/boardgame/utils/Collection.java +++ b/core/src/ch/asynk/gdx/boardgame/utils/Collection.java @@ -2,7 +2,7 @@ package ch.asynk.gdx.boardgame.utils; import java.util.Iterator; -public interface Collection<E> extends Iterator, Iterable<E> +public interface Collection<E> extends Iterator<E>, Iterable<E> { public int size(); diff --git a/core/src/ch/asynk/gdx/boardgame/utils/IterableArray.java b/core/src/ch/asynk/gdx/boardgame/utils/IterableArray.java index 1edf84f..f592baa 100644 --- a/core/src/ch/asynk/gdx/boardgame/utils/IterableArray.java +++ b/core/src/ch/asynk/gdx/boardgame/utils/IterableArray.java @@ -116,11 +116,10 @@ public class IterableArray<E> implements Collection<E> return false; } - @SuppressWarnings("unchecked") @Override public Iterator<E> iterator() { this.idx = 0; - return (Iterator<E>) this; + return this; } @Override public boolean hasNext() |