diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-16 10:42:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-16 10:42:19 +0100 |
commit | b3e854d1d35e890fba2b6cea269d58e09581c119 (patch) | |
tree | 354bc84a6172ef6ff41598a36340a73ef6d38440 | |
parent | 59f347809d6b6374431ad02847b67adcb065f56e (diff) | |
parent | e44b67037440ff27c77aa2d5917609de425b1054 (diff) | |
download | gdx-boardgame-b3e854d1d35e890fba2b6cea269d58e09581c119.zip gdx-boardgame-b3e854d1d35e890fba2b6cea269d58e09581c119.tar.gz |
Merge pull request #8 from SimonIT/fix-Collection-generic
Fix Iterator generic in Collection
-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() |