From e44b67037440ff27c77aa2d5917609de425b1054 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Mon, 16 Dec 2019 10:41:07 +0100 Subject: fix Iterator generic in Collection --- core/src/ch/asynk/gdx/boardgame/utils/Collection.java | 2 +- 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 extends Iterator, Iterable +public interface Collection extends Iterator, Iterable { 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 implements Collection return false; } - @SuppressWarnings("unchecked") @Override public Iterator iterator() { this.idx = 0; - return (Iterator) this; + return this; } @Override public boolean hasNext() -- cgit v1.1-2-g2b99