org.apache.commons.collections.BoundedMap |
Known Indirect Subclasses
FixedSizeMap |
Decorates another Map to fix the size, preventing add/remove. |
FixedSizeSortedMap |
Decorates another SortedMap to fix the size blocking add/remove. |
LRUMap |
A Map implementation with a fixed maximum size which removes
the least recently used entry if an entry is added when full. |
SingletonMap |
A Map implementation that holds a single item and is fixed size. |
|
Class Overview
Defines a map that is bounded in size.
The size of the map can vary, but it can never exceed a preset
maximum number of elements. This interface allows the querying of details
associated with the maximum number of elements.
Summary
Public Methods |
abstract
boolean
|
isFull()
Returns true if this map is full and no new elements can be added.
|
abstract
int
|
maxSize()
Gets the maximum size of the map (the bound).
|
[Expand]
Inherited Methods |
From interface
java.util.Map
abstract
void
|
clear()
|
abstract
boolean
|
containsKey(Object arg0)
|
abstract
boolean
|
containsValue(Object arg0)
|
abstract
Set<Entry<K, V>>
|
entrySet()
|
abstract
boolean
|
equals(Object arg0)
|
abstract
V
|
get(Object arg0)
|
abstract
int
|
hashCode()
|
abstract
boolean
|
isEmpty()
|
abstract
Set<K>
|
keySet()
|
abstract
V
|
put(K arg0, V arg1)
|
abstract
void
|
putAll(Map<? extends K, ? extends V> arg0)
|
abstract
V
|
remove(Object arg0)
|
abstract
int
|
size()
|
abstract
Collection<V>
|
values()
|
|
Public Methods
public
abstract
boolean
isFull
()
Returns true if this map is full and no new elements can be added.
public
abstract
int
maxSize
()
Gets the maximum size of the map (the bound).
Returns
- the maximum number of elements the map can hold