|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jjoost.collections.bimaps.AbstractBiMap<K,V,AnyMap<K,V>,AnyMap<V,K>>
org.jjoost.collections.bimaps.BiMap<K,V>
public class BiMap<K,V>
| Constructor Summary | |
|---|---|
BiMap(AnyMap<K,V> forwards,
AnyMap<V,K> back)
|
|
| Method Summary | |
|---|---|
AnyMap<K,V> |
copy()
Returns a copy of the map. |
AnySet<java.util.Map.Entry<K,V>> |
entries()
Returns a set representing all the key->value pairs in this map. |
AnySet<K> |
keys()
Returns a set representing all the keys in the domain of this map. |
AnySet<V> |
values(K key)
Returns a set representing the values associated with the provided key in this map. |
| Methods inherited from class org.jjoost.collections.bimaps.AbstractBiMap |
|---|
add, clear, clearAndReturn, contains, contains, count, count, entries, first, inverse, isEmpty, list, permitsDuplicateKeys, put, putIfAbsent, remove, remove, removeAndReturn, removeAndReturn, removeAndReturnFirst, shrink, totalCount, uniqueKeyCount, values |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BiMap(AnyMap<K,V> forwards,
AnyMap<V,K> back)
| Method Detail |
|---|
public AnyMap<K,V> copy()
AnyMap
public AnySet<java.util.Map.Entry<K,V>> entries()
AnyReadMapListMap 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.
public AnySet<K> keys()
AnyReadMapMultiMap or 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. The key equality used
by this map can be obtained from this set.
Depending on the implementation of map, this key set may contain every occurrence of equal keys provided to the map, or may contain a subset thereof with repetitions to bring the number of occurrences in line with the number provided.
Note that the put() methods on this set will always fail,
because no value can be provided to update the map with.
public AnySet<V> values(K key)
AnyReadMap
Note that in a regular (scalar) map the set returned will be a
UnitarySet, which contains at most one value.
put() operations on such a set will override any existing
value regardless of if it is equal to the one already present.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||