aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoman / Nea <roman.graef@gmail.com>2022-02-17 06:56:51 +0100
committerGitHub <noreply@github.com>2022-02-17 06:56:51 +0100
commit8a4261b64b3a108483c5cc66bce673968c0e29a3 (patch)
tree209667b91c078336bd09c41cca153c170d007ae8 /src
parentc29016098c558fc87af15f5895f09f416d6e7f2a (diff)
downloadNotEnoughUpdates-feature/katsitter.tar.gz
NotEnoughUpdates-feature/katsitter.tar.bz2
NotEnoughUpdates-feature/katsitter.zip
Remove unused scan functionfeature/katsitter
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java13
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;
- }
}