Package edu.uci.ics.jung.algorithms.util
Class BasicMapEntry<K,V>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.util.BasicMapEntry<K,V>
-
- Type Parameters:
K
- the key typeV
- the value type
- All Implemented Interfaces:
java.util.Map.Entry<K,V>
public class BasicMapEntry<K,V> extends java.lang.Object implements java.util.Map.Entry<K,V>
An simple minimal implementation ofMap.Entry
.
-
-
Constructor Summary
Constructors Constructor Description BasicMapEntry(K k, V v)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
K
getKey()
V
getValue()
int
hashCode()
(package private) void
recordAccess(java.util.HashMap<K,V> m)
This method is invoked whenever the value in an entry is overwritten by an invocation of put(k,v) for a key k that's already in the HashMap.(package private) void
recordRemoval(java.util.HashMap<K,V> m)
This method is invoked whenever the entry is removed from the table.V
setValue(V newValue)
java.lang.String
toString()
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
recordAccess
void recordAccess(java.util.HashMap<K,V> m)
This method is invoked whenever the value in an entry is overwritten by an invocation of put(k,v) for a key k that's already in the HashMap.
-
-