|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.common.util.BLCMapUtils
public class BLCMapUtils
Convenience methods for interacting with maps
| Constructor Summary | |
|---|---|
BLCMapUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
keyedListMap(CV values,
TypedClosure<K,V> closure)
Given a collection of values and a TypedClosure that maps an appropriate key for a given value, returns a HashMap of the key to a list of values that map to that key. |
|
static
|
keyedMap(CV values,
TypedClosure<K,V> closure)
Given a collection of values and a TypedClosure that maps an appropriate key for a given value, returns a HashMap of the key to the value. |
|
static
|
keyedMap(V[] values,
TypedClosure<K,V> closure)
Given an array of values and a TypedClosure that maps an appropriate key for a given value, returns a HashMap of the key to the value. |
|
static
|
valueSortedMap(Map<K,V> map,
Comparator<Map.Entry<K,V>> comparator)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BLCMapUtils()
| Method Detail |
|---|
public static <K,CV extends Iterable<V>,V> Map<K,V> keyedMap(CV values,
TypedClosure<K,V> closure)
values - closure -
List --> Map
public static <K,V> Map<K,V> keyedMap(V[] values,
TypedClosure<K,V> closure)
values - closure -
V[] --> Map
public static <K,CV extends Iterable<V>,V> Map<K,List<V>> keyedListMap(CV values,
TypedClosure<K,V> closure)
values - closure -
List --> Map>
public static <K,V> Map<K,V> valueSortedMap(Map<K,V> map,
Comparator<Map.Entry<K,V>> comparator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||