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) void
clear()
Provides for the clone operation.boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
freeze()
Freezes the object.int
hashCode()
boolean
isEmpty()
boolean
isFrozen()
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) void
putAll
(Collection<K> keys, V value) void
putAll
(K key, Collection<? extends V> values) boolean
boolean
removeAll
(Collection<K> toBeRemoved) boolean
int
size()
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:Freezable
Determines whether the object has been frozen or not. -
freeze
Description copied from interface:Freezable
Freezes the object. -
cloneAsThawed
Description copied from interface:Freezable
Provides for the clone operation. Any clone is initially unfrozen.- Specified by:
cloneAsThawed
in interfaceFreezable<K>
-
removeAll
-
removeAll
-
removeAll
-
removeAll
-