org.jjoost.collections.maps.nested
Class NestedSetMultiMap<K,V>
java.lang.Object
org.jjoost.collections.maps.nested.NestedSetMap<K,V,Set<V>>
org.jjoost.collections.maps.nested.NestedSetMultiMap<K,V>
- All Implemented Interfaces:
- java.io.Serializable, AnyMap<K,V>, AnyReadMap<K,V>, MultiMap<K,V>, Function<K,java.lang.Iterable<V>>
public class NestedSetMultiMap<K,V>
- extends NestedSetMap<K,V,Set<V>>
- implements MultiMap<K,V>
- See Also:
- Serialized Form
|
Method Summary |
java.lang.Iterable<V> |
apply(K v)
Returns the result of applying the function to the parameter |
MultiMap<K,V> |
copy()
Returns a copy of the map. |
Set<java.util.Map.Entry<K,V>> |
entries()
Returns a set representing all the key->value pairs in this map. |
| Methods inherited from class org.jjoost.collections.maps.nested.NestedSetMap |
add, clear, clearAndReturn, contains, contains, count, count, entries, first, inverse, isEmpty, keys, list, permitsDuplicateKeys, put, putIfAbsent, remove, remove, removeAndReturn, removeAndReturn, removeAndReturnFirst, shrink, totalCount, uniqueKeyCount, values, values |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jjoost.collections.AnyMap |
add, clear, clearAndReturn, inverse, remove, remove, removeAndReturn, removeAndReturn, removeAndReturnFirst, shrink, values |
| Methods inherited from interface org.jjoost.collections.AnyReadMap |
contains, contains, count, count, entries, first, isEmpty, list, permitsDuplicateKeys, totalCount, uniqueKeyCount |
NestedSetMultiMap
public NestedSetMultiMap(Map<K,Set<V>> map,
Equality<? super V> valueEq,
Factory<Set<V>> factory)
entries
public Set<java.util.Map.Entry<K,V>> entries()
- Description copied from interface:
AnyReadMap
- Returns a set representing all the key->value pairs in this map. In a
ListMap this will be a MultiSet. This set
should always reflect changes to the map, and changes to the set should
be reflected in the map also. Otherwise, this set should behave exactly
as a regular set does.
- Specified by:
entries in interface AnyMap<K,V>- Specified by:
entries in interface AnyReadMap<K,V>- Specified by:
entries in interface MultiMap<K,V>
- Returns:
- the entry set< k>
copy
public MultiMap<K,V> copy()
- Description copied from interface:
AnyMap
- Returns a copy of the map. Note that this method may not necessarily return an object of the same
class as the one it is called upon, but will return one indistinguishable from it with respect
to all method calls.
- Specified by:
copy in interface AnyMap<K,V>- Specified by:
copy in interface MultiMap<K,V>
- Returns:
- the any map< k, v>
apply
public java.lang.Iterable<V> apply(K v)
- Description copied from interface:
Function
- Returns the result of applying the function to the parameter
- Specified by:
apply in interface Function<K,java.lang.Iterable<V>>
- Parameters:
v - something of type domain
- Returns:
- the result of the function (something of type range)