public class IndexMultimap<A,B> extends AbstractMultimap<A,B>
| Constructor and Description |
|---|
IndexMultimap(Index<A> domIndex,
Index<B> ranIndex) |
IndexMultimap(IndexMultimap<A,B> m) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(A a,
B b)
Adds a pair to this this multimap.
|
boolean |
add(int i,
int j) |
boolean |
add(Map.Entry<A,B> e) |
boolean |
contains(A a,
B b) |
boolean |
contains(int i,
int j) |
boolean |
contains(Object x) |
boolean |
containsUnchecked(Object a,
Object b) |
Set<A> |
domain()
Returns the set of left components of pairs in this multimap.
|
Index<A> |
getDomainIndex() |
Index<B> |
getRangeIndex() |
IndexSet<B> |
image(A a)
Returns the set of right components of pairs with a given left
component in this multimap.
|
IndexSet<B> |
imageAll(Collection<? extends A> c) |
IndexSet<B> |
imageAllUnchecked(Collection<?> c) |
IndexSet<B> |
imageUnchecked(Object a) |
Iterator<Map.Entry<A,B>> |
iterator() |
IndexSet<A> |
preimage(B b)
Returns the set of left components of pairs with a given right
component in this multimap.
|
Set<B> |
range()
Returns the set of right components of pairs in this multimap.
|
boolean |
remove(A a,
B b)
Removes a pair from this this multimap.
|
boolean |
remove(int i,
int j) |
boolean |
removeDomain(A a)
Removes all pairs with a given left component from this
multimap.
|
boolean |
removeUnchecked(Object a,
Object b) |
int |
size() |
imageMap, preimageAll, preimageAllUnchecked, preimageMap, preimageUnchecked, relates, removeAllDomain, removeAllDomainUnchecked, removeAllRange, removeAllRangeUnchecked, removeDomainUnchecked, removeRange, removeRangeUnchecked, retainAllDomain, retainAllDomainUnchecked, retainAllRange, retainAllRangeUncheckedaddAll, clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic IndexMultimap(IndexMultimap<A,B> m)
public boolean add(int i,
int j)
public boolean remove(int i,
int j)
public boolean contains(int i,
int j)
public int size()
public boolean containsUnchecked(Object a, Object b)
containsUnchecked in interface Multimap<A,B>containsUnchecked in class AbstractMultimap<A,B>public boolean contains(Object x)
public boolean add(A a, B b)
Multimapequals any pair contained in
this multimap componentwise must not change this multimap.public boolean remove(A a, B b)
Multimapequals no pair contained in this multimap componentwise
must not change this multimap.public boolean removeUnchecked(Object a, Object b)
removeUnchecked in interface Multimap<A,B>removeUnchecked in class AbstractMultimap<A,B>public Set<A> domain()
MultimapThe 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 removeDomain operation,
then the returned set and its iterators must support the remove operation, and changes by these operations must be
reflected by this multimap.
public Set<B> range()
MultimapIf this multimap supports the removeRange operation,
then the returned set and its iterators must support the remove operation.
public boolean removeDomain(A a)
Multimap
removeDomain(final A a) {
for (B b : new HashSet<B>(range())) remove(a, b) ;
}
removeDomain in interface Multimap<A,B>removeDomain in class AbstractMultimap<A,B>a - the left component of all pairs to remove.true if this multimap has been changed by this
operation, false otherwise.public IndexSet<B> image(A a)
MultimapThe returned set need not be modifiable. The behaviour of this multimap after successfully modifying the returned set is unspecified.
public IndexSet<B> imageUnchecked(Object a)
imageUnchecked in interface Multimap<A,B>imageUnchecked in class AbstractMultimap<A,B>public IndexSet<B> imageAll(Collection<? extends A> c)
public IndexSet<B> imageAllUnchecked(Collection<?> c)
imageAllUnchecked in interface Multimap<A,B>imageAllUnchecked in class AbstractMultimap<A,B>public IndexSet<A> preimage(B b)
MultimapThe returned set need not be modifiable. The behaviour of this multimap after successfully modifying the returned set is unspecified.
see also the complete user documentation .