Class MiniMap<K,V>
- java.lang.Object
-
- org.apache.wicket.util.collections.MiniMap<K,V>
-
- Type Parameters:
K- Key typeV- Value type
- All Implemented Interfaces:
Serializable,Map<K,V>
public class MiniMap<K,V> extends Object implements Map<K,V>, Serializable
A fixed size map implementation. Holds an array of keys and array of values which correspond by index. Null key entries are available for use. This means that null is not a valid key.- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,V>>entrySet()Vget(Object key)booleanisEmpty()booleanisFull()Set<K>keySet()Vput(K key, V value)voidputAll(Map<? extends K,? extends V> map)Vremove(Object key)intsize()Collection<V>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
MiniMap
public MiniMap(int maxEntries)
Constructor- Parameters:
maxEntries- The maximum number of entries this map can hold
-
-
Method Detail
-
isFull
public boolean isFull()
- Returns:
- True if this MiniMap is full
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceMap<K,V>- See Also:
Map.isEmpty()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>- See Also:
Map.containsKey(java.lang.Object)
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>- See Also:
Map.containsValue(java.lang.Object)
-
get
public V get(Object key)
- Specified by:
getin interfaceMap<K,V>- See Also:
Map.get(java.lang.Object)
-
put
public V put(K key, V value)
- Specified by:
putin interfaceMap<K,V>- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
remove
public V remove(Object key)
- Specified by:
removein interfaceMap<K,V>- See Also:
Map.remove(java.lang.Object)
-
putAll
public void putAll(Map<? extends K,? extends V> map)
- Specified by:
putAllin interfaceMap<K,V>- See Also:
Map.putAll(java.util.Map)
-
values
public Collection<V> values()
- Specified by:
valuesin interfaceMap<K,V>- See Also:
Map.values()
-
-