Package eu.bandm.tools.util.multi
Class HashMultimap<A,B>
java.lang.Object
eu.bandm.tools.util.multi.MapMultimap<A,B>
eu.bandm.tools.util.multi.HashMultimap<A,B>
- All Implemented Interfaces:
Multimap<A,
,B> Serializable
,Iterable<Map.Entry<A,
,B>> Collection<Map.Entry<A,
,B>> BiPredicate<A,
,B> Set<Map.Entry<A,
B>>
An Implementation where both directions of look-up are realized by
hashing.
- See Also:
-
Field Summary
Fields inherited from class eu.bandm.tools.util.multi.MapMultimap
backward, forward, size
-
Constructor Summary
ConstructorsConstructorDescriptionHashMultimap
(HashMultimap<A, B> r) HashMultimap
(Collection<? extends Map.Entry<A, B>> c) HashMultimap
(Map<A, B> m) -
Method Summary
Modifier and TypeMethodDescriptionMust be implemented by each subclass.Must be implemented by each subclass.Methods inherited from class eu.bandm.tools.util.multi.MapMultimap
add, add, clear, contains, contains, domain, image, imageMap, imageUnchecked, isEmpty, iterator, preimage, preimageMap, preimageUnchecked, range, remove, remove, removeAllDomain, removeAllRange, removeDomain, removeRange, retainAllDomain, retainAllRange, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface eu.bandm.tools.util.multi.Multimap
addAll, containsAll, containsUnchecked, imageAll, imageAllUnchecked, preimageAll, preimageAllUnchecked, removeAll, removeAllDomainUnchecked, removeAllRangeUnchecked, removeDomainUnchecked, removeRangeUnchecked, removeUnchecked, retainAll, retainAllDomainUnchecked, retainAllRangeUnchecked, test, toArray, toArray
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
HashMultimap
public HashMultimap() -
HashMultimap
-
HashMultimap
-
HashMultimap
-
-
Method Details
-
createForwardSet
Description copied from class:MapMultimap
Must be implemented by each subclass. This method is called to create the image set for every "A a" added. When the map A->Set<B> is sorted, then this set should also be.- Specified by:
createForwardSet
in classMapMultimap<A,
B>
-
createBackwardSet
Description copied from class:MapMultimap
Must be implemented by each subclass. This method is called to create the preimage set for every new "B b" added. When the map B->Set<A> is sorted, then this set should also be.- Specified by:
createBackwardSet
in classMapMultimap<A,
B>
-