|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ws4d.java.structures.HashMap
org.ws4d.java.structures.LinkedMap
public class LinkedMap
Class memorizes the order in which objects were inserted. Iterators of the sets returned by this map will have the same sequence. Inserting an already existing entry into the map won't change the order of the elements. Behavior can be extended so that accessing a entry of the map will move this entry to the end of the sequence.
Constructor Summary | |
---|---|
LinkedMap()
Constructor. |
|
LinkedMap(boolean accessOrdering)
Constructor. |
|
LinkedMap(HashMap m)
Constructor will create a clone of the specified map. |
|
LinkedMap(int initialCapacity)
Constructor with initial capacity to specify. |
|
LinkedMap(int initialCapacity,
boolean accessOrdering)
Constructor with initial capacity to specify. |
Method Summary | |
---|---|
void |
clear()
|
boolean |
containsValue(java.lang.Object value)
|
Set |
entrySet()
|
java.lang.Object |
get(int index)
|
java.lang.Object |
get(java.lang.Object key)
Get associated value to given key. |
Set |
keySet()
|
java.lang.Object |
remove(int index)
|
java.lang.Object |
removeFirst()
|
java.lang.Object |
removeLast()
|
DataStructure |
values()
|
Methods inherited from class org.ws4d.java.structures.HashMap |
---|
containsKey, equals, hashCode, isEmpty, put, putAll, remove, size, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LinkedMap()
public LinkedMap(boolean accessOrdering)
true
, then accessing
entries by the get()-method will moved it to the end of the iterator
sequences.
initialCapacity
- initial capacity to reserveaccessOrdering
- public LinkedMap(int initialCapacity)
initialCapacity
- public LinkedMap(int initialCapacity, boolean accessOrdering)
true
, then accessing entries by the get()-method will moved
it to the end of the iterator sequences.
initialCapacity
- initial capacity to reserveaccessOrdering
- public LinkedMap(HashMap m)
m
- map to clone.Method Detail |
---|
public void clear()
clear
in class HashMap
public boolean containsValue(java.lang.Object value)
containsValue
in class HashMap
public java.lang.Object get(java.lang.Object key)
HashMap
null
will always
return null
;
get
in class HashMap
key
- the key to lookup
null
public java.lang.Object get(int index)
public java.lang.Object remove(int index)
public java.lang.Object removeFirst()
public java.lang.Object removeLast()
public Set entrySet()
entrySet
in class HashMap
public Set keySet()
keySet
in class HashMap
public DataStructure values()
values
in class HashMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |