diff --git a/build.gradle.kts b/build.gradle.kts index b85de7f0..8e3f179d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,6 @@ plugins { id("distributor.parent-conventions") } -version = "3.2.0" + if (indraGit.headTag() == null) "-SNAPSHOT" else "" +version = "3.2.1" + if (indraGit.headTag() == null) "-SNAPSHOT" else "" group = "fr.xpdustry" description = "The Mindustry plugin of ur dreams..." diff --git a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcList.java b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcList.java index b2b6f882..bed3ca4d 100644 --- a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcList.java +++ b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcList.java @@ -23,11 +23,8 @@ import java.io.Serializable; import java.util.AbstractList; import java.util.Collection; -import java.util.Comparator; import java.util.List; import java.util.RandomAccess; -import java.util.function.Consumer; -import java.util.function.Predicate; import java.util.function.UnaryOperator; /** @@ -51,22 +48,6 @@ public void replaceAll(final UnaryOperator operator) { this.seq.replace(operator::apply); } - @Override - public void sort(final Comparator c) { - this.seq.sort(c); - } - - @Override - public boolean removeIf(final Predicate filter) { - final var size = this.seq.size; - return size != this.seq.removeAll(filter::test).size; - } - - @Override - public void forEach(final Consumer action) { - this.seq.forEach(action); - } - @Override public int size() { return this.seq.size; diff --git a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcMap.java b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcMap.java index 1f059b1c..b8976b93 100644 --- a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcMap.java +++ b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcMap.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.function.BiConsumer; import org.checkerframework.checker.nullness.qual.Nullable; /** @@ -102,11 +101,6 @@ public V getOrDefault(final Object key, final V defaultValue) { return this.map.get((K) key, defaultValue); } - @Override - public void forEach(final BiConsumer action) { - this.map.each(action::accept); - } - @Override public Set> entrySet() { if (this.entries == null) { diff --git a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcSet.java b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcSet.java index 4afdb9cf..eba5f7d9 100644 --- a/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcSet.java +++ b/distributor-api/src/main/java/fr/xpdustry/distributor/api/util/ArcSet.java @@ -24,7 +24,6 @@ import java.util.AbstractSet; import java.util.Iterator; import java.util.Set; -import java.util.function.Consumer; /** * A wrapper {@link Set} for an {@link ObjectSet}. @@ -42,14 +41,9 @@ final class ArcSet extends AbstractSet implements Serializable { this.set = set; } - @Override - public void forEach(final Consumer action) { - this.set.forEach(action); - } - @Override public Iterator iterator() { - return this.set.iterator(); + return this.set.new ObjectSetIterator(); } @Override @@ -68,16 +62,6 @@ public boolean contains(final Object o) { return this.set.contains((E) o); } - @Override - public Object[] toArray() { - return this.set.toSeq().toArray(); - } - - @Override - public T[] toArray(final T[] a) { - return this.set.toSeq().toArray(a.getClass().getComponentType()); - } - @Override public boolean add(final E e) { return this.set.add(e);