public class MapUtils extends Object
Constructor and Description |
---|
MapUtils() |
Modifier and Type | Method and Description |
---|---|
static <T,U> void |
addToMapList(Map<T,List<U>> mapList,
T key,
U value)
An extremely common pattern: add an item to a list in a hash value, creating that list if
necessary
TODO: Replace with Guava
|
static <T,U> void |
addToMapListUnique(Map<T,List<U>> mapList,
T key,
List<U> values) |
static <T,U> void |
addToMapSet(Map<T,Set<U>> mapList,
T key,
U value)
An extremely common pattern: add an item to a set in a hash value, creating that set if
necessary
TODO: Replace with Guava
|
static <T> boolean |
addToMaxMap(Map<T,Double> map,
T key,
double value) |
static <T,U,V extends Collection<U>> |
mergeInUnique(Map<T,V> mapList,
Map<T,V> from) |
public static final <T,U> void addToMapSet(Map<T,Set<U>> mapList, T key, U value)
public static final <T,U> void addToMapList(Map<T,List<U>> mapList, T key, U value)
public static <T,U> void addToMapListUnique(Map<T,List<U>> mapList, T key, List<U> values)
public static <T,U,V extends Collection<U>> void mergeInUnique(Map<T,V> mapList, Map<T,V> from)
Copyright © 2018. All rights reserved.