|
3 | 3 | import net.marcellperger.mathexpr.*; |
4 | 4 | import net.marcellperger.mathexpr.util.Util; |
5 | 5 | import net.marcellperger.mathexpr.util.UtilCollectors; |
6 | | -import org.jetbrains.annotations.Contract; |
7 | 6 | import org.jetbrains.annotations.NotNull; |
8 | 7 | import org.jetbrains.annotations.Nullable; |
9 | 8 | import org.jetbrains.annotations.Range; |
10 | 9 |
|
11 | 10 | import java.nio.CharBuffer; |
12 | | -import java.util.*; |
13 | | -import java.util.AbstractMap.SimpleEntry; |
14 | | -import java.util.Map.Entry; |
| 11 | +import java.util.Arrays; |
| 12 | +import java.util.Comparator; |
| 13 | +import java.util.Map; |
| 14 | +import java.util.Objects; |
| 15 | +import java.util.Set; |
15 | 16 | import java.util.function.Function; |
16 | 17 | import java.util.regex.Matcher; |
17 | 18 | import java.util.regex.Pattern; |
@@ -177,13 +178,4 @@ protected boolean matchesNext(@NotNull String expected) { |
177 | 178 | Arrays.stream(expected).sorted(Comparator.comparingInt(String::length).reversed()).toArray(String[]::new)); |
178 | 179 | } |
179 | 180 | // endregion |
180 | | - |
181 | | - @Contract(pure = true) |
182 | | - private static<K, V, R> @NotNull Function<Entry<K, V>, Entry<K, R>> _valueTransformer(Function<V, R> fn) { |
183 | | - return e -> _makeEntry(e.getKey(), fn.apply(e.getValue())); |
184 | | - } |
185 | | - @Contract(value = "_, _ -> new", pure = true) |
186 | | - private static @NotNull <K, V> Entry<K, V> _makeEntry(K k, V v) { |
187 | | - return new SimpleEntry<>(k, v); |
188 | | - } |
189 | 181 | } |
0 commit comments