|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections15.map.Flat3Map<K,V>
public class Flat3Map<K,V>
A Map implementation that stores data in simple fields until
the size is greater than 3.
Flat3Map if the size is likely to grow beyond 3.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
Flat3Map()
Constructor. |
|
Flat3Map(Map<K,V> map)
Constructor copying elements from another map. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the map, resetting the size to zero and nullifying references to avoid garbage collection issues. |
Object |
clone()
Clones the map without cloning the keys or values. |
boolean |
containsKey(Object key)
Checks whether the map contains the specified key. |
boolean |
containsValue(Object value)
Checks whether the map contains the specified value. |
protected AbstractHashedMap<K,V> |
createDelegateMap()
Create an instance of the map used for storage when in delegation mode. |
Set<Map.Entry<K,V>> |
entrySet()
Gets the entrySet view of the map. |
boolean |
equals(Object obj)
Compares this map with another. |
V |
get(Object key)
Gets the value mapped to the key specified. |
int |
hashCode()
Gets the standard Map hashCode. |
boolean |
isEmpty()
Checks whether the map is currently empty. |
Set |
keySet()
Gets the keySet view of the map. |
MapIterator<K,V> |
mapIterator()
Gets an iterator over the map. |
V |
put(K key,
V value)
Puts a key-value mapping into this map. |
void |
putAll(Map<? extends K,? extends V> map)
Puts all the values from the specified map into this map. |
V |
remove(Object key)
Removes the specified mapping from this map. |
int |
size()
Gets the size of the map. |
String |
toString()
Gets the map as a String. |
Collection<V> |
values()
Gets the values view of the map. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Flat3Map()
public Flat3Map(Map<K,V> map)
map - the map to copy
NullPointerException - if the map is null| Method Detail |
|---|
public V get(Object key)
get in interface Map<K,V>key - the key
public int size()
size in interface Map<K,V>public boolean isEmpty()
isEmpty in interface Map<K,V>public boolean containsKey(Object key)
containsKey in interface Map<K,V>key - the key to search for
public boolean containsValue(Object value)
containsValue in interface Map<K,V>value - the value to search for
public V put(K key,
V value)
put in interface Map<K,V>key - the key to addvalue - the value to add
public void putAll(Map<? extends K,? extends V> map)
putAll in interface Map<K,V>map - the map to add
NullPointerException - if the map is nullprotected AbstractHashedMap<K,V> createDelegateMap()
public V remove(Object key)
remove in interface Map<K,V>key - the mapping to remove
public void clear()
clear in interface Map<K,V>public MapIterator<K,V> mapIterator()
mapIterator in interface IterableMap<K,V>public Set<Map.Entry<K,V>> entrySet()
mapIterator().
entrySet in interface Map<K,V>public Set keySet()
mapIterator().
keySet in interface Map<K,V>public Collection<V> values()
mapIterator().
values in interface Map<K,V>public Object clone()
clone in class Objectpublic boolean equals(Object obj)
equals in interface Map<K,V>equals in class Objectobj - the object to compare to
public int hashCode()
hashCode in interface Map<K,V>hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||