Class IdentityMultiMap<K,V>
java.lang.Object
org.semanticweb.owlapitools.decomposition.IdentityMultiMap<K,V>
- Type Parameters:
K- keyV- value
- All Implemented Interfaces:
Serializable
- Author:
- ignazio palmisano
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleanbooleancontainsKey(K k) booleancontainsValue(V v) returns a mutable set of values connected to the key; if no value is connected, returns an immutable empty setbooleankeySet()booleanvoidputAll(K k, Collection<V> v) voidputAll(IdentityMultiMap<K, V> otherMap) booleanremoves the set of values connected to the keybooleanremoves the value connected to the key; if there is more than one value connected to the key, only one is removedvoidsetEntry(K key, Collection<V> values) intsize()toString()
-
Constructor Details
-
IdentityMultiMap
public IdentityMultiMap()
-
-
Method Details
-
put
- Parameters:
key- keyvalue- value- Returns:
- true if changes happen
-
setEntry
- Parameters:
key- keyvalues- values
-
get
returns a mutable set of values connected to the key; if no value is connected, returns an immutable empty set- Parameters:
key- key- Returns:
- the set of values connected with the key
-
keySet
- Returns:
- the set of keys
-
getAllValues
- Returns:
- all values in the map
-
remove
removes the set of values connected to the key- Parameters:
key- key- Returns:
- true if changes made
-
remove
removes the value connected to the key; if there is more than one value connected to the key, only one is removed- Parameters:
key- keyvalue- value- Returns:
- true if changes made
-
size
public int size()- Returns:
- the size of the multimap (sum of all the sizes of the sets)
-
contains
- Parameters:
k- keyv- value- Returns:
- true if the pairing (k, v) is in the map (set equality for v)
-
containsKey
- Parameters:
k- key- Returns:
- true if k is a key for the map
-
containsValue
- Parameters:
v- value- Returns:
- true if v is a value for a key in the map
-
clear
public void clear() -
toString
-
putAll
- Parameters:
otherMap- map to copy from
-
putAll
- Parameters:
k- kv- v
-
isValueSetsEqual
public boolean isValueSetsEqual()- Returns:
- true if duplicate value sets
-