Package com.ibm.icu.impl
Class Relation<K,V>
- java.lang.Object
-
- com.ibm.icu.impl.Relation<K,V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Relation.SimpleEntry<K,V>
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<K,java.util.Set<V>>
data
(package private) boolean
frozen
(package private) java.lang.Object[]
setComparatorParam
(package private) java.lang.reflect.Constructor<? extends java.util.Set<V>>
setCreator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Relation<K,V>
addAllInverted(Relation<V,K> source)
Relation<K,V>
addAllInverted(java.util.Map<V,K> source)
void
clear()
Relation<K,V>
cloneAsThawed()
Provides for the clone operation.boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
boolean
equals(java.lang.Object o)
Relation<K,V>
freeze()
Freezes the object.java.util.Set<V>
get(java.lang.Object key)
java.util.Set<V>
getAll(java.lang.Object key)
int
hashCode()
boolean
isEmpty()
boolean
isFrozen()
Determines whether the object has been frozen or not.java.util.Set<K>
keySet()
java.util.Set<java.util.Map.Entry<K,V>>
keyValueSet()
java.util.Set<java.util.Map.Entry<K,java.util.Set<V>>>
keyValuesSet()
private java.util.Set<V>
newSet()
static <K,V>
Relation<K,V>of(java.util.Map<K,java.util.Set<V>> map, java.lang.Class<?> setCreator)
static <K,V>
Relation<K,V>of(java.util.Map<K,java.util.Set<V>> map, java.lang.Class<?> setCreator, java.util.Comparator<V> setComparator)
V
put(K key, V value)
void
putAll(Relation<? extends K,? extends V> t)
V
putAll(java.util.Collection<K> keys, V value)
void
putAll(java.util.Map<? extends K,? extends V> t)
V
putAll(K key, java.util.Collection<? extends V> values)
boolean
remove(K key, V value)
boolean
removeAll(Relation<K,V> toBeRemoved)
java.util.Set<V>
removeAll(java.util.Collection<K> toBeRemoved)
java.util.Set<V>
removeAll(K key)
java.util.Set<V>
removeAll(K... keys)
boolean
removeAll(K key, java.lang.Iterable<V> toBeRemoved)
int
size()
java.lang.String
toString()
java.util.Set<V>
values()
<C extends java.util.Collection<V>>
Cvalues(C result)
-
-
-
Method Detail
-
of
public static <K,V> Relation<K,V> of(java.util.Map<K,java.util.Set<V>> map, java.lang.Class<?> setCreator)
-
of
public static <K,V> Relation<K,V> of(java.util.Map<K,java.util.Set<V>> map, java.lang.Class<?> setCreator, java.util.Comparator<V> setComparator)
-
clear
public void clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getAll
public java.util.Set<V> getAll(java.lang.Object key)
-
get
public java.util.Set<V> get(java.lang.Object key)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isEmpty
public boolean isEmpty()
-
keySet
public java.util.Set<K> keySet()
-
newSet
private java.util.Set<V> newSet()
-
size
public int size()
-
values
public java.util.Set<V> values()
-
values
public <C extends java.util.Collection<V>> C values(C result)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isFrozen
public boolean isFrozen()
Description copied from interface:Freezable
Determines whether the object has been frozen or not.
-
freeze
public Relation<K,V> freeze()
Description copied from interface:Freezable
Freezes the object.
-
cloneAsThawed
public Relation<K,V> cloneAsThawed()
Description copied from interface:Freezable
Provides for the clone operation. Any clone is initially unfrozen.- Specified by:
cloneAsThawed
in interfaceFreezable<K>
-
-