refactor: we don't need explicit types here

This commit is contained in:
Breno A.
2024-06-09 09:17:05 -03:00
Unverified
parent fcd409320d
commit b5d0afd0fe
14 changed files with 38 additions and 38 deletions
@@ -261,22 +261,22 @@ public final class Language {
.collect(Collectors.toList());
Map<TextStrings, TextStrings> canonicalTextStrings = new HashMap<>();
return new Int2ObjectOpenHashMap<TextStrings>(
nameHashes
.intStream()
.boxed()
.collect(
Collectors.toMap(
key -> key,
key -> {
TextStrings t =
new TextStrings(
IntStream.range(0, TextStrings.NUM_LANGUAGES)
.mapToObj(i -> languageMaps.get(i).get((int) key))
.collect(Collectors.toList()),
key);
return canonicalTextStrings.computeIfAbsent(t, x -> t);
})));
return new Int2ObjectOpenHashMap<>(
nameHashes
.intStream()
.boxed()
.collect(
Collectors.toMap(
key -> key,
key -> {
TextStrings t =
new TextStrings(
IntStream.range(0, TextStrings.NUM_LANGUAGES)
.mapToObj(i -> languageMaps.get(i).get((int) key))
.collect(Collectors.toList()),
key);
return canonicalTextStrings.computeIfAbsent(t, x -> t);
})));
}
@SuppressWarnings("unchecked")