refactor: replace lambda with method reference

This commit is contained in:
Breno A.
2024-06-09 09:11:58 -03:00
Unverified
parent 870085fc91
commit 3119e0fffc
13 changed files with 22 additions and 20 deletions
@@ -253,11 +253,11 @@ public final class Language {
TextStrings.LIST_LANGUAGES.parallelStream()
.collect(
Collectors.toConcurrentMap(
s -> TextStrings.MAP_LANGUAGES.getInt(s),
TextStrings.MAP_LANGUAGES::getInt,
s -> loadTextMapFile(s, nameHashes)));
List<Int2ObjectMap<String>> languageMaps =
IntStream.range(0, TextStrings.NUM_LANGUAGES)
.mapToObj(i -> mapLanguageMaps.get(i))
.mapToObj(mapLanguageMaps::get)
.collect(Collectors.toList());
Map<TextStrings, TextStrings> canonicalTextStrings = new HashMap<>();