Package components.map
Class MapSecondary<K,V>
java.lang.Object
components.map.MapSecondary<K,V>
- Type Parameters:
K- type ofMapdomain (key) entriesV- type ofMaprange (associated value) entries
Layered implementations of secondary methods for
Map.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classStraightforward implementation ofPairinterface. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcombineWith(Map<K, V> m) Combinesmwiththis.final booleaninthashCode()booleanReports whether there is a pair inthiswhose second component isvalue.Reports a key associated withvalueinthis.replaceValue(K key, V value) Replaces the value associated withkeyinthiswithvalueand returns the old value.booleansharesKeyWith(Map<K, V> m) Reports whetherthisandmhave any keys in common.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface components.map.MapKernel
add, hasKey, remove, removeAny, size, valueMethods inherited from interface components.standard.Standard
clear, newInstance, transferFrom
-
Constructor Details
-
MapSecondary
public MapSecondary()
-
-
Method Details
-
equals
-
hashCode
-
toString
-
replaceValue
Description copied from interface:MapReplaces the value associated withkeyinthiswithvalueand returns the old value.- Specified by:
replaceValuein interfaceMap<K,V> - Parameters:
key- the key whose associated value is replacedvalue- the value replacing the old one- Returns:
- the old value associated with the given key
-
key
Description copied from interface:MapReports a key associated withvalueinthis. Note that the key returned generally should not be changed at all via this aliased reference, and if it is then it definitely must not be changed in such a way that it equals another key in the map from which it was obtained. -
hasValue
Description copied from interface:MapReports whether there is a pair inthiswhose second component isvalue. -
combineWith
Description copied from interface:MapCombinesmwiththis.- Specified by:
combineWithin interfaceMap<K,V> - Parameters:
m- theMapto be combined withthis
-