VCollections – Release 1
Interface org.violetlib.collections.MapSetBuilder
Deprecated: ShowHide
-
public interface MapSetBuilder<K,V>
Build an immutable map from keys of type K to immutable sets of values of type V. Null values are not supported.
-
-
|
Modifier and Type |
Method and Description |
 |
add   |
abstract void add(K key,
V value)
Add an element to the set associated with the specified key.
-
Add an element to the set associated with the specified key.
- Parameters:
key - The key.value - The value to be added.
|
 |
addAll   |
abstract void addAll(IMap<K,ISet<V>> values)
Add elements to the set from the associated map.
-
Add elements to the set from the associated map.
- Parameters:
values - The values to be added.
|
 |
addAll   |
abstract void addAll(K key,
ICollection<V> values)
Add elements to the set associated with the specified key.
-
Add elements to the set associated with the specified key.
- Parameters:
key - The key.values - The values to be added.
|
 |
getValueCount   |
abstract int getValueCount(K key)
Return the number of distinct values associated with the specified key.
-
Return the number of distinct values associated with the specified key.
- Parameters:
key - The key.
- Returns:
- the number of values associated with
key .
|
 |
getValues   |
abstract ISet<V> getValues(K key)
Return the values currently associated with the specified key.
-
Return the values currently associated with the specified key.
- Parameters:
key - The key.
- Returns:
- an immutable set that contains the values associated with the specified key.
|
 |
keys   |
Return the keys that have associated values.
-
Return the keys that have associated values.
|
 |
size   |
abstract int size()
Return the number of keys with associated values.
int size()
-
Return the number of keys with associated values.
|
 |
value   |
Return a map containing the keys bound to sets of values.
-
Return a map containing the keys bound to sets of values.
|