tech.kronicle.utils.MapCollectors Maven / Gradle / Ivy
package tech.kronicle.utils;
import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
public final class MapCollectors {
public static Collector, ?, Map> toMap() {
return Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue);
}
public static Collector, ?, Map> toUnmodifiableMap() {
return Collectors.toUnmodifiableMap(Map.Entry::getKey, Map.Entry::getValue);
}
private MapCollectors() {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy