|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
K
- V
- @Immutable public interface JImmutableListMap<K,V>
Interface for maps that map keys to lists of values.
Method Summary | |
---|---|
JImmutableListMap<K,V> |
assign(K key,
JImmutableList<V> value)
Sets the list associated with a specific key. |
JImmutableListMap<K,V> |
delete(K key)
Deletes the entry for the specified key (if any). |
JImmutableListMap<K,V> |
deleteAll()
|
JImmutableList<V> |
getList(K key)
Return the list associated with key or an empty list if no list is associated. |
Insertable<JImmutableMap.Entry<K,V>> |
insert(JImmutableMap.Entry<K,V> value)
Add key/value entry to the map, replacing any existing entry with same key. |
JImmutableListMap<K,V> |
insert(K key,
V value)
Add value to the list for the specified key. |
boolean |
isEmpty()
|
Cursor<K> |
keysCursor()
Creates a Cursor to access all of the Map's keys. |
int |
size()
Return the number of keys in the map. |
Cursor<V> |
valuesCursor(K key)
Creates a Cursor to access all of the specified key's list. |
Methods inherited from interface org.javimmutable.collections.Mapped |
---|
find, get, getValueOr |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.javimmutable.collections.Cursorable |
---|
cursor |
Method Detail |
---|
@Nonnull JImmutableList<V> getList(@Nonnull K key)
key
- identifies the value to retrieve
@Nonnull JImmutableListMap<K,V> assign(@Nonnull K key, @Nonnull JImmutableList<V> value)
key
- non-null keyvalue
- list of possibly null values to use for this key
@Nonnull Insertable<JImmutableMap.Entry<K,V>> insert(@Nonnull JImmutableMap.Entry<K,V> value)
insert
in interface Insertable<JImmutableMap.Entry<K,V>>
value
-
@Nonnull JImmutableListMap<K,V> insert(@Nonnull K key, @Nullable V value)
value
- value
-
@Nonnull JImmutableListMap<K,V> delete(@Nonnull K key)
key
- non-null key
int size()
boolean isEmpty()
@Nonnull JImmutableListMap<K,V> deleteAll()
@Nonnull Cursor<K> keysCursor()
@Nonnull Cursor<V> valuesCursor(@Nonnull K key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |