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 booleanequals(java.lang.Object o)KgetKey()VgetValue()inthashCode()(package private) voidrecordAccess(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) voidrecordRemoval(java.util.HashMap<K,V> m)This method is invoked whenever the entry is removed from the table.VsetValue(V newValue)java.lang.StringtoString()
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
-
hashCode
public int hashCode()
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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.
-
-