| Constructor and Description |
|---|
Relation(Map<K,Set<V>> map,
Class<?> setCreator) |
Relation(Map<K,Set<V>> map,
Class<?> setCreator,
Comparator<V> setComparator) |
| Modifier and Type | Method and Description |
|---|---|
Relation<K,V> |
addAllInverted(Map<V,K> source) |
Relation<K,V> |
addAllInverted(Relation<V,K> source) |
void |
clear() |
Relation<K,V> |
cloneAsThawed()
Provides for the clone operation.
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object o) |
Relation<K,V> |
freeze()
Freezes the object.
|
Set<V> |
get(Object key) |
Set<V> |
getAll(Object key) |
int |
hashCode() |
boolean |
isEmpty() |
boolean |
isFrozen()
Determines whether the object has been frozen or not.
|
Set<K> |
keySet() |
Set<Map.Entry<K,V>> |
keyValueSet() |
Set<Map.Entry<K,Set<V>>> |
keyValuesSet() |
static <K,V> Relation<K,V> |
of(Map<K,Set<V>> map,
Class<?> setCreator) |
static <K,V> Relation<K,V> |
of(Map<K,Set<V>> map,
Class<?> setCreator,
Comparator<V> setComparator) |
V |
put(K key,
V value) |
V |
putAll(Collection<K> keys,
V value) |
V |
putAll(K key,
Collection<? extends V> values) |
void |
putAll(Map<? extends K,? extends V> t) |
void |
putAll(Relation<? extends K,? extends V> t) |
boolean |
remove(K key,
V value) |
Set<V> |
removeAll(Collection<K> toBeRemoved) |
Set<V> |
removeAll(K... keys) |
Set<V> |
removeAll(K key) |
boolean |
removeAll(K key,
Iterable<V> toBeRemoved) |
boolean |
removeAll(Relation<K,V> toBeRemoved) |
int |
size() |
String |
toString() |
Set<V> |
values() |
<C extends Collection<V>> |
values(C result) |
public static <K,V> Relation<K,V> of(Map<K,Set<V>> map, Class<?> setCreator, Comparator<V> setComparator)
public void clear()
public boolean containsKey(Object key)
public boolean containsValue(Object value)
public boolean isEmpty()
public V putAll(K key, Collection<? extends V> values)
public V putAll(Collection<K> keys, V value)
public int size()
public <C extends Collection<V>> C values(C result)
public boolean isFrozen()
Freezablepublic Relation<K,V> freeze()
Freezablepublic Relation<K,V> cloneAsThawed()
FreezablecloneAsThawed in interface Freezable<Relation<K,V>>@SafeVarargs public final Set<V> removeAll(K... keys)
public Set<V> removeAll(Collection<K> toBeRemoved)