Package com.ibm.icu.impl
Class Relation<K,V>
java.lang.Object
com.ibm.icu.impl.Relation<K,V>
A Relation is a set of mappings from keys to values.
Unlike Map, there is not guaranteed to be a single value per key.
The Map-like APIs return collections for values.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) Object[](package private) Constructor<? extends Set<V>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllInverted(Relation<V, K> source) addAllInverted(Map<V, K> source) voidclear()Provides for the clone operation.booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanfreeze()Freezes the object.inthashCode()booleanisEmpty()booleanisFrozen()Determines whether the object has been frozen or not.keySet()newSet()static <K,V> Relation <K, V> static <K,V> Relation <K, V> of(Map<K, Set<V>> map, Class<?> setCreator, Comparator<V> setComparator) voidputAll(Collection<K> keys, V value) voidputAll(K key, Collection<? extends V> values) booleanbooleanremoveAll(Collection<K> toBeRemoved) booleanintsize()toString()values()<C extends Collection<V>>
Cvalues(C result)
-
Field Details
-
data
-
setCreator
Constructor<? extends Set<V>> setCreator -
setComparatorParam
Object[] setComparatorParam -
frozen
volatile boolean frozen
-
-
Constructor Details
-
Relation
-
Relation
-
-
Method Details
-
of
-
of
public static <K,V> Relation<K,V> of(Map<K, Set<V>> map, Class<?> setCreator, Comparator<V> setComparator) -
clear
public void clear() -
containsKey
-
containsValue
-
entrySet
-
keyValuesSet
-
keyValueSet
-
equals
-
getAll
-
get
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
putAll
-
newSet
-
putAll
-
putAll
-
removeAll
-
remove
-
size
public int size() -
values
-
values
-
toString
-
addAllInverted
-
addAllInverted
-
isFrozen
public boolean isFrozen()Description copied from interface:FreezableDetermines whether the object has been frozen or not. -
freeze
Description copied from interface:FreezableFreezes the object. -
cloneAsThawed
Description copied from interface:FreezableProvides for the clone operation. Any clone is initially unfrozen.- Specified by:
cloneAsThawedin interfaceFreezable<K>
-
removeAll
-
removeAll
-
removeAll
-
removeAll
-