Class IndexMultimap<A,B>
- All Implemented Interfaces:
Multimap<A,,B> Iterable<Map.Entry<A,,B>> Collection<Map.Entry<A,,B>> BiPredicate<A,,B> Set<Map.Entry<A,B>>
-
Constructor Summary
ConstructorsConstructorDescriptionIndexMultimap(Index<A> domIndex, Index<B> ranIndex) IndexMultimap(IndexMultimap<A, B> m) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int i, int j) Special for indexed bases multimaps, is NOT an override.booleanAdds a pair to this multimap.booleanbooleancontains(int i, int j) Special for indexed bases multimaps, is NOT an override.booleanWhether this multimap contains a pair with the given components.booleanbooleancontainsUnchecked(Object a, Object b) domain()Returns the set of left components of pairs in this multimap.Returns the set of right components of pairs with a given left component in this multimap.imageAll(Collection<? extends A> c) Returns the set of right components of pairs in this multimap, which have a left component in the given set.imageAllUnchecked(Collection<?> c) iterator()Returns the set of left components of pairs with a given right component in this multimap.range()Returns the set of right components of pairs in this multimap.booleanremove(int i, int j) Special for indexed bases multimaps, is NOT an override.booleanRemoves a pair from this this multimap.booleanremoveDomain(A a) Removes all pairs with a given left component from this multimap.booleanremoveUnchecked(Object a, Object b) intsize()Methods inherited from class eu.bandm.tools.ops.AbstractMultimap
imageMap, preimageAll, preimageAllUnchecked, preimageMap, preimageUnchecked, removeAllDomain, removeAllDomainUnchecked, removeAllRange, removeAllRangeUnchecked, removeDomainUnchecked, removeRange, removeRangeUnchecked, retainAllDomain, retainAllDomainUnchecked, retainAllRange, retainAllRangeUnchecked, testMethods inherited from class java.util.AbstractCollection
addAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.function.BiPredicate
and, negate, orMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Constructor Details
-
IndexMultimap
-
IndexMultimap
-
-
Method Details
-
getDomainIndex
-
getRangeIndex
-
add
public boolean add(int i, int j) Special for indexed bases multimaps, is NOT an override. -
remove
public boolean remove(int i, int j) Special for indexed bases multimaps, is NOT an override. -
contains
public boolean contains(int i, int j) Special for indexed bases multimaps, is NOT an override. -
size
public int size() -
iterator
-
contains
Description copied from interface:MultimapWhether this multimap contains a pair with the given components. -
containsUnchecked
- Specified by:
containsUncheckedin interfaceMultimap<A,B> - Overrides:
containsUncheckedin classAbstractMultimap<A,B> - See Also:
-
contains
-
add
Description copied from interface:MultimapAdds a pair to this multimap. This operation must be stable: adding a pair thatequalsany pair contained in this multimap componentwise must not change this multimap. -
add
-
remove
Description copied from interface:MultimapRemoves a pair from this this multimap. Removing a pair thatequalsno pair contained in this multimap componentwise must not change this multimap. -
removeUnchecked
- Specified by:
removeUncheckedin interfaceMultimap<A,B> - Overrides:
removeUncheckedin classAbstractMultimap<A,B> - See Also:
-
domain
Description copied from interface:MultimapReturns the set of left components of pairs in this multimap.The returned set is backed by this multimap, such that changes to this multimap are reflected by the set. The behavior of modifications of this multimap concurrent to iteration of the set is unspecified.
If this multimap supports the
removeDomainoperation, then the returned set and its iterators must support theremoveoperation, and changes by these operations must be reflected by this multimap. -
range
Description copied from interface:MultimapReturns the set of right components of pairs in this multimap.If this multimap supports the
removeRangeoperation, then the returned set and its iterators must support theremoveoperation. -
removeDomain
Description copied from interface:MultimapRemoves all pairs with a given left component from this multimap. The effect of the implementation on this multimap must be equivalent to the following code:removeDomain(final A a) { for (B b : new HashSet<B>(range())) remove(a, b) ; }- Specified by:
removeDomainin interfaceMultimap<A,B> - Overrides:
removeDomainin classAbstractMultimap<A,B> - Parameters:
a- the left component of all pairs to remove.- Returns:
trueif this multimap has been changed by this operation,falseotherwise.
-
image
Description copied from interface:MultimapReturns the set of right components of pairs with a given left component in this multimap.The returned set need not be modifiable. The behaviour of this multimap after successfully modifying the returned set is unspecified.
-
imageUnchecked
- Specified by:
imageUncheckedin interfaceMultimap<A,B> - Overrides:
imageUncheckedin classAbstractMultimap<A,B> - See Also:
-
imageAll
Description copied from interface:MultimapReturns the set of right components of pairs in this multimap, which have a left component in the given set. -
imageAllUnchecked
- Specified by:
imageAllUncheckedin interfaceMultimap<A,B> - Overrides:
imageAllUncheckedin classAbstractMultimap<A,B> - See Also:
-
preimage
Description copied from interface:MultimapReturns the set of left components of pairs with a given right component in this multimap.The returned set need not be modifiable. The behaviour of this multimap after successfully modifying the returned set is unspecified.
-