java.lang.Object | ||
↳ | java.util.AbstractMap<K, V> | |
↳ | com.sun.tools.jdi.LinkedHashMap |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new, empty LinkedHashMap with the specified initial
capacity and the specified load factor.
| |||||||||||
Constructs a new, empty LinkedHashMap with the specified initial capacity
and default load factor.
| |||||||||||
Constructs a new, empty LinkedHashMap with a default capacity and load
factor.
| |||||||||||
Constructs a new LinkedHashMap with the same mappings as the given
Map.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes all mappings from this LinkedHashMap.
| |||||||||||
Returns a shallow copy of this LinkedHashMap.
| |||||||||||
Returns true if this LinkedHashMap contains a mapping for the specified
key.
| |||||||||||
Returns true if this LinkedHashMap maps one or more keys to the specified
value.
| |||||||||||
Returns a Collection view of the mappings contained in this
LinkedHashMap.
| |||||||||||
Compares the specified Object with this Map for equality.
| |||||||||||
Returns the value to which this LinkedHashMap maps the specified key.
| |||||||||||
Returns the position of the mapping for the specified key
in the ordered map.
| |||||||||||
Returns true if this Map contains no key-value mappings.
| |||||||||||
Returns a Set view of the keys contained in this LinkedHashMap.
| |||||||||||
Associates the specified value with the specified key in this
LinkedHashMap and position the mapping at the specified index.
| |||||||||||
Associates the specified value with the specified key in this
LinkedHashMap.
| |||||||||||
Copies all of the mappings from the specified Map to this LinkedHashMap
These mappings will replace any mappings that this LinkedHashMap had for
any of the keys currently in the specified Map.
| |||||||||||
Removes the mapping for this key from this LinkedHashMap if present.
| |||||||||||
Returns the number of key-value mappings in this Map.
| |||||||||||
Returns a Collection view of the values contained in this LinkedHashMap.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.AbstractMap
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.util.Map
|
Constructs a new, empty LinkedHashMap with the specified initial capacity and the specified load factor.
initialCapacity | the initial capacity of the LinkedHashMap. |
---|---|
loadFactor | a number between 0.0 and 1.0. |
IllegalArgumentException | if the initial capacity is less than or equal to zero, or if the load factor is less than or equal to zero. |
---|
Constructs a new, empty LinkedHashMap with the specified initial capacity and default load factor.
initialCapacity | the initial capacity of the LinkedHashMap. |
---|
Constructs a new, empty LinkedHashMap with a default capacity and load factor.
Constructs a new LinkedHashMap with the same mappings as the given Map. The LinkedHashMap is created with a capacity of thrice the number of mappings in the given Map or 11 (whichever is greater), and a default load factor.
Removes all mappings from this LinkedHashMap.
Returns a shallow copy of this LinkedHashMap. The keys and values themselves are not cloned.
Returns true if this LinkedHashMap contains a mapping for the specified key.
key | key whose presence in this Map is to be tested. |
---|
Returns true if this LinkedHashMap maps one or more keys to the specified value.
value | value whose presence in this Map is to be tested. |
---|
Returns a Collection view of the mappings contained in this LinkedHashMap. Each element in the returned collection is a Map.Entry. The Collection is backed by the LinkedHashMap, so changes to the LinkedHashMap are reflected in the Collection, and vice-versa. The Collection supports element removal, which removes the corresponding mapping from the LinkedHashMap, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.
Compares the specified Object with this Map for equality.
Returns true if the given object is also a LinkedHashMap and the two
Maps represent the same mappings in the same order. More formally,
two Maps t1
and t2
represent the same mappings
if t1.keySet().equals(t2.keySet())
and for every
key k
in t1.keySet()
,
(t1.get(k)==null ? t2.get(k)==null : t1.get(k).equals(t2.get(k)))
.
This implementation first checks if the specified Object is this Map; if so it returns true. Then, it checks if the specified Object is a Map whose size is identical to the size of this Set; if not, it it returns false. If so, it iterates over this Map and the specified Map's entrySet() Collection, and checks that the specified Map contains each mapping that this Map contains at the same position. If the specified Map fails to contain such a mapping in the right order, false is returned. If the iteration completes, true is returned.
o | Object to be compared for equality with this Map. |
---|
Returns the value to which this LinkedHashMap maps the specified key. Returns null if the LinkedHashMap contains no mapping for this key. A return value of null does not necessarily indicate that the LinkedHashMap contains no mapping for the key; it's also possible that the LinkedHashMap explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.
key | key whose associated value is to be returned. |
---|
null
if this map contains no mapping for the keyReturns the position of the mapping for the specified key in the ordered map.
key | the specified key. |
---|
Returns true if this Map contains no key-value mappings.
Returns a Set view of the keys contained in this LinkedHashMap. The Set is backed by the LinkedHashMap, so changes to the LinkedHashMap are reflected in the Set, and vice-versa. The Set supports element removal, which removes the corresponding mapping from the LinkedHashMap, via the Iterator.remove, Set.remove, removeAll retainAll, and clear operations. It does not support the add or addAll operations.
Associates the specified value with the specified key in this LinkedHashMap and position the mapping at the specified index. If the LinkedHashMap previously contained a mapping for this key, the old value is replaced and the position of this mapping entry in the double linked list remains the same. Otherwise, a new mapping entry is created and inserted into the list at the specified position.
index | the position to put the key-value mapping. |
---|---|
key | key with which the specified value is to be associated. |
value | value to be associated with the specified key. |
Associates the specified value with the specified key in this LinkedHashMap. If the LinkedHashMap previously contained a mapping for this key, the old value is replaced. The mapping entry is also appended to the end of the ordered linked list.
key | key with which the specified value is to be associated. |
---|---|
value | value to be associated with the specified key. |
Copies all of the mappings from the specified Map to this LinkedHashMap These mappings will replace any mappings that this LinkedHashMap had for any of the keys currently in the specified Map.
t | Mappings to be stored in this Map. |
---|
Removes the mapping for this key from this LinkedHashMap if present. The mapping would also be removed from the double linked list.
key | key whose mapping is to be removed from the Map. |
---|
Returns the number of key-value mappings in this Map.
Returns a Collection view of the values contained in this LinkedHashMap. The Collection is backed by the LinkedHashMap, so changes to the LinkedHashMap are reflected in the Collection, and vice-versa. The Collection supports element removal, which removes the corresponding mapping from the LinkedHashMap, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. It does not support the add or addAll operations.