Package org.zkoss.zkmax.bind.ext
Class StandardBiMap<K,V>
java.lang.Object
org.zkoss.zkmax.bind.ext.ForwardingMap<K,V>
org.zkoss.zkmax.bind.ext.StandardBiMap<K,V>
- All Implemented Interfaces:
Serializable,Map<K,V>
A general-purpose bimap implementation using any two backing
Map
instances.- Author:
- Kevin Bourrillion, Mike Bostock
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckArgument(boolean expression) static voidcheckArgument(boolean expression, Object errorMessage) static voidcheckArgument(boolean expression, String errorMessageTemplate, Object... errorMessageArgs) static voidcheckState(boolean expression) static voidcheckState(boolean expression, Object errorMessage) voidclear()booleancontainsValue(Object value) delegate()entrySet()inverse()keySet()voidprotected VputInBothMaps(K key, V value, boolean force) protected VremoveFromBothMaps(Object key) protected voidremoveFromInverseMap(V oldValue) protected voidSpecifies the delegate maps going in each direction.protected voidupdateInverseMap(K key, boolean containedKey, V oldValue, V newValue) values()Methods inherited from class org.zkoss.zkmax.bind.ext.ForwardingMap
containsKey, createEntrySet, createKeySet, createValues, equals, get, hashCode, isEmpty, size, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
StandardBiMap
Package-private constructor for creating a map-backed bimap.
-
-
Method Details
-
delegate
- Specified by:
delegatein classForwardingMap<K,V>
-
setDelegates
Specifies the delegate maps going in each direction. Called by the constructor and by subclasses during deserialization. -
containsValue
- Specified by:
containsValuein interfaceMap<K,V> - Overrides:
containsValuein classForwardingMap<K,V>
-
put
-
forcePut
-
putInBothMaps
-
updateInverseMap
-
remove
-
removeFromBothMaps
-
removeFromInverseMap
-
putAll
-
clear
public void clear() -
inverse
-
keySet
-
values
-
entrySet
-
checkState
public static void checkState(boolean expression) -
checkState
-
checkArgument
public static void checkArgument(boolean expression) -
checkArgument
-
checkArgument
-