Class MicroMap<K,V>
- java.lang.Object
-
- org.apache.wicket.util.collections.MicroMap<K,V>
-
- Type Parameters:
K- Key typeV- Value type
- All Implemented Interfaces:
java.io.Serializable,java.util.Map<K,V>
public final class MicroMap<K,V> extends java.lang.Object implements java.util.Map<K,V>, java.io.SerializableAn implementation of the java.util.Map interface which can only hold a single object. This is particularly useful to control memory usage in Wicket because many containers hold only a single component.- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_ENTRIESThe maximum number of entries this map supports.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)booleanisEmpty()booleanisFull()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> map)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()
-
-
-
Field Detail
-
MAX_ENTRIES
public static final int MAX_ENTRIES
The maximum number of entries this map supports.- See Also:
- Constant Field Values
-
-
Method Detail
-
isFull
public boolean isFull()
- Returns:
- True if this MicroMap is full
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
get
public V get(java.lang.Object key)
-
remove
public V remove(java.lang.Object key)
-
clear
public void clear()
-
keySet
public java.util.Set<K> keySet()
-
values
public java.util.Collection<V> values()
-
-