public class MapUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
getFilteredMap(java.util.Map<java.lang.String,java.lang.String> m,
java.util.function.Predicate predicate)
Returns a map with all keys that match the predicate.
|
static java.util.Map<java.lang.String,java.lang.String> |
getPrefixMap(java.util.Map<java.lang.String,java.lang.String> m,
java.lang.String prefix)
Returns a map with all keys that start with the given prefix.
|
static java.util.Map<java.lang.String,java.lang.String> |
unmodifiableMap(java.util.Map<java.lang.String,java.lang.String> m)
Returns an unmodifiable map.
|
public static java.util.Map<java.lang.String,java.lang.String> getPrefixMap(java.util.Map<java.lang.String,java.lang.String> m, java.lang.String prefix)
m
- The map to filter.prefix
- The prefix to filter by.public static java.util.Map<java.lang.String,java.lang.String> getFilteredMap(java.util.Map<java.lang.String,java.lang.String> m, java.util.function.Predicate predicate)
m
- The map to filter.predicate
- The predicate expression to filter the keys.public static java.util.Map<java.lang.String,java.lang.String> unmodifiableMap(java.util.Map<java.lang.String,java.lang.String> m)
m
- The map to make unmodifiable.