|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.util.LinkedMap<K,V>
public class LinkedMap<K,V>
A doubly linked list that can also map entries on keys. The list can be iterated in FIFO order and implements the following operations in constant time:
Nested Class Summary | |
---|---|
protected static class |
LinkedMap.LinkedValue<K,V>
|
Constructor Summary | |
---|---|
LinkedMap()
Creates a list. |
Method Summary | |
---|---|
void |
add(K key,
V value)
Adds a value at the end of the list. |
void |
addAll(LinkedMap<K,V> map)
Adds all entries from the map to this map, preserving the order. |
void |
addFirst(K key,
V value)
Adds a value at the start of the list |
boolean |
isEmpty()
Determines whether the list is empty. |
V |
pop()
Removes and returns the first element in the list. |
V |
remove(K key)
Removes and returns an element mapped to a key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedMap()
Method Detail |
---|
public void add(K key, V value)
key
- the not-null key to which the value is mappedvalue
- the valuepublic void addFirst(K key, V value)
key
- the not-null key to which the value is mappedvalue
- the valuepublic boolean isEmpty()
public V pop()
public V remove(K key)
key
-
null
if the key is not mappedpublic void addAll(LinkedMap<K,V> map)
map
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |