diff options
author | Roman / Nea <roman.graef@gmail.com> | 2022-02-17 06:56:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 06:56:51 +0100 |
commit | 8a4261b64b3a108483c5cc66bce673968c0e29a3 (patch) | |
tree | 209667b91c078336bd09c41cca153c170d007ae8 | |
parent | c29016098c558fc87af15f5895f09f416d6e7f2a (diff) | |
download | NotEnoughUpdates-8a4261b64b3a108483c5cc66bce673968c0e29a3.tar.gz NotEnoughUpdates-8a4261b64b3a108483c5cc66bce673968c0e29a3.tar.bz2 NotEnoughUpdates-8a4261b64b3a108483c5cc66bce673968c0e29a3.zip |
Remove unused scan functionfeature/katsitter
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 00a6e5f4..f09883eb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -48,8 +48,6 @@ import java.nio.FloatBuffer; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.*; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.BiFunction; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -1476,15 +1474,4 @@ public class Utils { return left <= x && x <= left + width && top <= y && y <= top + height; } - - public static <T, U> List<U> runningReduce(Iterable<T> values, U initial, BiFunction<T, U, U> reducer) { - Spliterator<T> spliterator = values.spliterator(); - long size = spliterator.estimateSize(); - List<U> rets = new ArrayList<>(Math.toIntExact(size == Long.MAX_VALUE ? 0 : size)); - AtomicReference<U> acc = new AtomicReference<>(initial); - spliterator.forEachRemaining(it -> { - acc.getAndUpdate(value -> reducer.apply(it, value)); - }); - return rets; - } } |