org.aksw.commons.collections
Class MapUtils
java.lang.Object
org.aksw.commons.collections.MapUtils
public class MapUtils
- extends Object
Created by IntelliJ IDEA.
User: raven
Date: 4/22/11
Time: 2:36 PM
To change this template use File | Settings | File Templates.
|
Method Summary |
static
|
createChainMap(Map<K,?> a,
Map<?,V> b)
|
static
|
getOrCreate(Map<K,V> map,
K key,
Class<V> clazz,
Object... ctorArgs)
|
static
|
getOrElse(Map<? extends K,? extends V> map,
K key,
V elze)
|
static
|
isCompatible(Map<K,V> a,
Map<K,V> b)
Compatible means that merging the two maps would not result in the same
key being mapped to distinct values. |
static
|
isPartiallyCompatible(Map<K,V> a,
Map<K,V> b)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapUtils
public MapUtils()
isCompatible
public static <K,V> boolean isCompatible(Map<K,V> a,
Map<K,V> b)
- Compatible means that merging the two maps would not result in the same
key being mapped to distinct values.
Or put differently:
The union of the two maps retains a functional mapping.
- Type Parameters:
K - V - - Parameters:
a - b -
- Returns:
isPartiallyCompatible
public static <K,V> boolean isPartiallyCompatible(Map<K,V> a,
Map<K,V> b)
getOrElse
public static <K,V> V getOrElse(Map<? extends K,? extends V> map,
K key,
V elze)
createChainMap
public static <K,V> Map<K,V> createChainMap(Map<K,?> a,
Map<?,V> b)
getOrCreate
public static <K,V> V getOrCreate(Map<K,V> map,
K key,
Class<V> clazz,
Object... ctorArgs)
Copyright © 2011. All Rights Reserved.