public class MapKit extends Object
| 构造器 | 说明 |
|---|---|
MapKit() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static <K,V> K[] |
keyToArray(Map<K,V> map,
Class<K> kClass,
K... removeKeys) |
A map to array for Key
将 map 转换成 key 的数组 |
static <K,V> List<K> |
keyToList(Map<K,V> map,
K... removeKeys) |
A map to List for Key
将 map 转换成 key 的List |
static <K,V> com.iofairy.tuple.Tuple2<K[],V[]> |
mapToArray(Map<K,V> map,
Class<K> kClass,
Class<V> vClass,
K... removeKeys) |
A map to two array for Key and Value
将 map 转换成 key和value 的数组 |
static <K,V> com.iofairy.tuple.Tuple2<List<K>,List<V>> |
mapToList(Map<K,V> map,
K... removeKeys) |
A map to two List for Key and Value
将 map 转换成 key和value 的List |
static <K,V> List<Map.Entry<K,V>> |
sortBy(List<Map.Entry<K,V>> entries,
Comparator<? super Map.Entry<K,V>> comparator) |
To sort map according to the provided
Comparator. |
static <K,V,U extends Comparable<? super U>> |
sortBy(List<Map.Entry<K,V>> entries,
Function<? super Map.Entry<K,V>,? extends U> keyExtractor) |
To sort map according to the provided
Function. |
static <K,V> List<Map.Entry<K,V>> |
sortBy(Map<K,V> map,
Comparator<? super Map.Entry<K,V>> comparator) |
To sort map according to the provided
Comparator. |
static <K,V,U extends Comparable<? super U>> |
sortBy(Map<K,V> map,
Function<? super Map.Entry<K,V>,? extends U> keyExtractor) |
To sort map according to the provided
Function. |
static <K,V> List<Map.Entry<K,V>> |
sortByDouble(List<Map.Entry<K,V>> entries,
ToDoubleFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToDoubleFunction. |
static <K,V> List<Map.Entry<K,V>> |
sortByDouble(Map<K,V> map,
ToDoubleFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToDoubleFunction. |
static <K,V> List<Map.Entry<K,V>> |
sortByInt(List<Map.Entry<K,V>> entries,
ToIntFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToIntFunction. |
static <K,V> List<Map.Entry<K,V>> |
sortByInt(Map<K,V> map,
ToIntFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToIntFunction. |
static <K,V> List<Map.Entry<K,V>> |
sortByLong(List<Map.Entry<K,V>> entries,
ToLongFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToLongFunction. |
static <K,V> List<Map.Entry<K,V>> |
sortByLong(Map<K,V> map,
ToLongFunction<? super Map.Entry<K,V>> keyExtractor) |
To sort map according to the provided
ToLongFunction. |
static <K,V> V[] |
valueToArray(Map<K,V> map,
Class<V> vClass,
K... removeKeys) |
A map to array for Value
将 map 转换成 value 的数组 |
static <K,V> List<V> |
valueToList(Map<K,V> map,
K... removeKeys) |
A map to List for Value
将 map 转换成 value 的List |
@SafeVarargs public static <K,V> com.iofairy.tuple.Tuple2<List<K>,List<V>> mapToList(Map<K,V> map, K... removeKeys)
K - key typeV - value typemap - mapremoveKeys - remove keys@SafeVarargs public static <K,V> List<K> keyToList(Map<K,V> map, K... removeKeys)
K - key typeV - value typemap - mapremoveKeys - remove keys@SafeVarargs public static <K,V> List<V> valueToList(Map<K,V> map, K... removeKeys)
K - key typeV - value typemap - mapremoveKeys - remove keys@SafeVarargs public static <K,V> com.iofairy.tuple.Tuple2<K[],V[]> mapToArray(Map<K,V> map, Class<K> kClass, Class<V> vClass, K... removeKeys)
K - key typeV - value typemap - mapkClass - key classvClass - value classremoveKeys - remove keys@SafeVarargs public static <K,V> K[] keyToArray(Map<K,V> map, Class<K> kClass, K... removeKeys)
K - key typeV - value typemap - mapkClass - key classremoveKeys - remove keys@SafeVarargs public static <K,V> V[] valueToArray(Map<K,V> map, Class<V> vClass, K... removeKeys)
K - key typeV - value typemap - mapvClass - value classremoveKeys - remove keyspublic static <K,V> List<Map.Entry<K,V>> sortBy(Map<K,V> map, Comparator<? super Map.Entry<K,V>> comparator)
Comparator. K - key typeV - value typemap - mapcomparator - comparatorMap.Entrypublic static <K,V,U extends Comparable<? super U>> List<Map.Entry<K,V>> sortBy(Map<K,V> map, Function<? super Map.Entry<K,V>,? extends U> keyExtractor)
Function. K - key typeV - value typeU - return type of Functionmap - mapkeyExtractor - keyExtractorMap.Entrypublic static <K,V> List<Map.Entry<K,V>> sortByInt(Map<K,V> map, ToIntFunction<? super Map.Entry<K,V>> keyExtractor)
ToIntFunction. K - key typeV - value typemap - mapkeyExtractor - keyExtractorMap.Entrypublic static <K,V> List<Map.Entry<K,V>> sortByLong(Map<K,V> map, ToLongFunction<? super Map.Entry<K,V>> keyExtractor)
ToLongFunction. K - key typeV - value typemap - mapkeyExtractor - keyExtractorMap.Entrypublic static <K,V> List<Map.Entry<K,V>> sortByDouble(Map<K,V> map, ToDoubleFunction<? super Map.Entry<K,V>> keyExtractor)
ToDoubleFunction. K - key typeV - value typemap - mapkeyExtractor - keyExtractorMap.Entrypublic static <K,V> List<Map.Entry<K,V>> sortBy(List<Map.Entry<K,V>> entries, Comparator<? super Map.Entry<K,V>> comparator)
Comparator. public static <K,V,U extends Comparable<? super U>> List<Map.Entry<K,V>> sortBy(List<Map.Entry<K,V>> entries, Function<? super Map.Entry<K,V>,? extends U> keyExtractor)
Function. public static <K,V> List<Map.Entry<K,V>> sortByInt(List<Map.Entry<K,V>> entries, ToIntFunction<? super Map.Entry<K,V>> keyExtractor)
ToIntFunction. public static <K,V> List<Map.Entry<K,V>> sortByLong(List<Map.Entry<K,V>> entries, ToLongFunction<? super Map.Entry<K,V>> keyExtractor)
ToLongFunction. Copyright © 2023. All rights reserved.