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 void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<K,V>>
entrySet()
V
get(Object key)
boolean
isEmpty()
boolean
isFull()
Set<K>
keySet()
V
put(K key, V value)
void
putAll(Map<? extends K,? extends V> map)
V
remove(Object key)
int
size()
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:
isEmpty
in interfaceMap<K,V>
- See Also:
Map.isEmpty()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<K,V>
- See Also:
Map.containsKey(java.lang.Object)
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<K,V>
- See Also:
Map.containsValue(java.lang.Object)
-
get
public V get(Object key)
- Specified by:
get
in interfaceMap<K,V>
- See Also:
Map.get(java.lang.Object)
-
put
public V put(K key, V value)
- Specified by:
put
in interfaceMap<K,V>
- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
remove
public V remove(Object key)
- Specified by:
remove
in interfaceMap<K,V>
- See Also:
Map.remove(java.lang.Object)
-
putAll
public void putAll(Map<? extends K,? extends V> map)
- Specified by:
putAll
in interfaceMap<K,V>
- See Also:
Map.putAll(java.util.Map)
-
values
public Collection<V> values()
- Specified by:
values
in interfaceMap<K,V>
- See Also:
Map.values()
-
-