public class BfMaps extends Object
| Constructor and Description |
|---|
BfMaps() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Map<K,V> |
assoc(Map<K,V> map,
K key,
V val)
Update or replace key with val.
|
static <K,V> Map<K,V> |
assoc(Map<K,V> map,
Map.Entry<K,V>... entries)
Update or replace with e(key, val)
|
static <K,V> Map<K,V> |
assoc(Map<K,V> map,
Map<K,V> upsertMap)
Update map with content from upsertMap.
|
static <K,V> Map<K,V> |
dissoc(Map<K,V> map,
K... keys)
Drop the keys specified from the map specified
|
static <K,V> Map.Entry<K,V> |
e(K key,
V val)
Create an entry with key : val.
|
static <K,V> Map<K,V> |
map(Map.Entry<K,V>... entries)
Create a map with the specified entries.
|
static <K,V> Map<K,V> |
merge(Map<K,V>... maps)
merges N maps.
|
public static <K,V> Map<K,V> merge(Map<K,V>... maps)
maps - the maps to mergepublic static <K,V> Map<K,V> assoc(Map<K,V> map, Map.Entry<K,V>... entries)
map - The map to updateentries - The entries to add to the map.public static <K,V> Map<K,V> assoc(Map<K,V> map, Map<K,V> upsertMap)
map - The map to update.upsertMap - The map to source for updates.public static <K,V> Map<K,V> dissoc(Map<K,V> map, K... keys)
map - The map to start from.keys - The keys to removepublic static <K,V> Map<K,V> map(Map.Entry<K,V>... entries)
entries - the entries to add to the map.public static <K,V> Map<K,V> assoc(Map<K,V> map, K key, V val)
map - The map to create an updated version ofkey - The key to either update or add.val - The value to place at this key.public static <K,V> Map.Entry<K,V> e(K key, V val)
key - The key.val - The value.Copyright © 2016. All rights reserved.