public abstract class MapUtils extends Object
| 构造器和说明 |
|---|
MapUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <K,V> Map<K,V> |
compareDifference(Map<K,V> left,
Map<K,V> right) |
static <V> void |
copyKeys(Map<String,V> map,
String substr,
MatchMode matchMode,
Map<String,V> target) |
static void |
copyProperties(Properties src,
Properties dest) |
static void |
copyProperties(Properties src,
String prefix,
Map<String,String> dest) |
static void |
copyProperties(Properties src,
String substr,
MatchMode matchMode,
Map<String,String> dest) |
static void |
copyProperties(Properties src,
String substr,
MatchMode matchMode,
Properties dest) |
static void |
copyProperties(Properties src,
String prefix,
Properties dest) |
static <K> void |
copyValues(Map<K,String> map,
String substr,
MatchMode matchMode,
Map<K,String> target) |
static <K,V> boolean |
deepEquals(Map<K,V> left,
Map<K,V> right) |
static <K,V> int |
deepHashCode(Map<K,V> map) |
static <K,V> Map<K,String> |
formats(Map<K,V> map,
String format) |
static <K,V> V |
get(Map<K,V> map,
K key) |
static <K,V> V |
get(Map<K,V> map,
K key,
java.util.function.Function<K,V> function) |
static <K,V> V |
get(Map<K,V> map,
K key,
java.util.function.Supplier<V> supplier) |
static <T> T |
get(Map<String,?> map,
String key,
Class<T> requiredType,
T defaultValue) |
static <K,V> Map.Entry<K,V> |
getEntry(Map<K,V> map,
int index) |
static <K,V> Map.Entry<K,V> |
getFirstEntry(Map<K,V> map) |
static <K,V> Map.Entry<K,V> |
getLastEntry(Map<K,V> map) |
static <K,V> V |
getOrDefault(Map<K,V> map,
K key,
V defaultValue) |
static <K,V> V |
getOrThrown(Map<K,V> map,
K key,
RuntimeException e) |
private static <K,V> int |
indexFor(Map<K,V> map,
int index) |
static <K,V> Map<K,V> |
intersect(Map<K,V> src,
Map<K,V> dest) |
static boolean |
isEmpty(Map map) |
static boolean |
isMap(Object obj) |
static boolean |
isNotEmpty(Map map) |
static boolean |
isNotMap(Object obj) |
static <K,V> String |
join(Map<K,V> map) |
static <K,V> String |
join(Map<K,V> map,
String delimiter) |
static <K,V> String |
join(Map<K,V> map,
String conjunction,
String delimiter) |
static void |
main(String[] args) |
static Map<String,String> |
mergeProperties(Properties left,
Properties right,
Map<String,String> output) |
static <K,V> Map<K,V> |
minus(Map<K,V> src,
Map<K,V> dest) |
static Map<String,String> |
populate(Object... kwargs) |
static <K,V> void |
putAll(Map<K,V> map,
Collection<Map.Entry<K,V>> entries) |
static <K,V> void |
putAll(Map<K,V> map,
Map.Entry<K,V>[] entries) |
static <K,V> void |
removeKeys(Map<K,V> map,
Collection<K> keys) |
static <K,V> void |
removeKeys(Map<K,V> map,
K[] keys) |
static <K,V> void |
retainKeys(Map<K,V> map,
Collection<K> keys) |
static <K,V> void |
retainKeys(Map<K,V> map,
K[] keys) |
static <K,V> void |
retainValues(Map<K,V> map,
Collection<K> values) |
static <K,V> void |
retainValues(Map<K,V> map,
K[] values) |
static <K,V> Map<V,K> |
reverse(Map<K,V> map) |
static <K,V> Map<K,V> |
sort(Map<K,V> map,
Comparator<Map.Entry<K,V>> c) |
static <K,V> List<Map.Entry<K,V>> |
toEntries(Map<K,V> map) |
static <E> List<E> |
toList(Map<E,E> map) |
static <T> Map<T,T> |
toMap(Collection<T> c) |
static <T> Map<T,T> |
toMap(Enumeration<T> en) |
static <T> Map<T,T> |
toMap(Iterator<T> it) |
static <K,V> Map<K,V> |
toMap(K[] left,
V[] right) |
static Map<String,String> |
toMap(Properties src) |
static Map<String,String> |
toMap(Properties src,
String prefix) |
static Map<String,String> |
toMap(Properties src,
String substr,
MatchMode matchMode) |
static <T> Map<T,T> |
toMap(T... args) |
static <V> Map<String,V> |
toMatchedKeyMap(Map<String,V> m,
String substr,
MatchMode matchMode) |
static <K> Map<K,String> |
toMatchedValueMap(Map<K,String> m,
String substr,
MatchMode matchMode) |
static Properties |
toProperties(Map<String,String> map) |
static String |
toString(Map map) |
static <K,V> Map<K,V> |
union(Map<K,V> src,
Map<K,V> dest) |
public static boolean isMap(Object obj)
public static boolean isNotMap(Object obj)
public static <K,V> V get(Map<K,V> map, K key)
public static <K,V> V getOrThrown(Map<K,V> map, K key, RuntimeException e)
public static <K,V> V getOrDefault(Map<K,V> map, K key, V defaultValue)
public static <K,V> V get(Map<K,V> map, K key, java.util.function.Supplier<V> supplier)
public static <K,V> V get(Map<K,V> map, K key, java.util.function.Function<K,V> function)
private static <K,V> int indexFor(Map<K,V> map, int index)
public static void main(String[] args)
public static <K,V> void putAll(Map<K,V> map, Collection<Map.Entry<K,V>> entries)
public static <K,V> void removeKeys(Map<K,V> map, Collection<K> keys)
public static <K,V> void removeKeys(Map<K,V> map, K[] keys)
public static <K,V> void retainKeys(Map<K,V> map, Collection<K> keys)
public static <K,V> void retainKeys(Map<K,V> map, K[] keys)
public static <K,V> void retainValues(Map<K,V> map, Collection<K> values)
public static <K,V> void retainValues(Map<K,V> map, K[] values)
public static <K,V> Map<K,V> toMap(K[] left, V[] right)
public static <T> Map<T,T> toMap(T... args)
public static <T> Map<T,T> toMap(Collection<T> c)
public static <T> Map<T,T> toMap(Enumeration<T> en)
public static boolean isEmpty(Map map)
public static boolean isNotEmpty(Map map)
public static <K,V> int deepHashCode(Map<K,V> map)
public static <K,V> Map<K,V> sort(Map<K,V> map, Comparator<Map.Entry<K,V>> c)
public static Map<String,String> mergeProperties(Properties left, Properties right, Map<String,String> output)
public static Map<String,String> toMap(Properties src)
public static Map<String,String> toMap(Properties src, String prefix)
public static Properties toProperties(Map<String,String> map)
public static void copyProperties(Properties src, Properties dest)
public static void copyProperties(Properties src, String prefix, Properties dest)
public static void copyProperties(Properties src, String prefix, Map<String,String> dest)
public static void copyProperties(Properties src, String substr, MatchMode matchMode, Properties dest)
public static void copyProperties(Properties src, String substr, MatchMode matchMode, Map<String,String> dest)
public static <K> Map<K,String> toMatchedValueMap(Map<K,String> m, String substr, MatchMode matchMode)
public static <V> Map<String,V> toMatchedKeyMap(Map<String,V> m, String substr, MatchMode matchMode)
public static <V> void copyKeys(Map<String,V> map, String substr, MatchMode matchMode, Map<String,V> target)
public static <K> void copyValues(Map<K,String> map, String substr, MatchMode matchMode, Map<K,String> target)
Copyright © 2020. All rights reserved.