list转换到map
1 | public static <K, V> Map<K, V> listToMap(List<V> list, Function<V, K> function) { |
map转换到list
1 | public static <K, V, T> Map<K, T> listToMap(List<V> list, Function<V, K> keyFunction, Function<V, T> valueFunction) { |
list转换到map
1 | public static <K, V> Map<K, V> listToMap(List<V> list, Function<V, K> function) { |
map转换到list
1 | public static <K, V, T> Map<K, T> listToMap(List<V> list, Function<V, K> keyFunction, Function<V, T> valueFunction) { |