Package org.eclipse.emf.common.util
Class BasicEMap.EntryImpl
java.lang.Object
org.eclipse.emf.common.util.BasicEMap.EntryImpl
- All Implemented Interfaces:
Map.Entry<K,,V> BasicEMap.Entry<K,V>
A simple and obvious entry implementation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
hash
protected int hashThe cached hash code of the key. -
key
The key. -
value
The value.
-
-
Constructor Details
-
EntryImpl
Creates a fully initialized instance.- Parameters:
hash- the hash code of the key.key- the key.value- the value.
-
-
Method Details
-
clone
Returns a new entry just like this one. -
getHash
public int getHash()Description copied from interface:BasicEMap.EntryReturns the hash code of the key. Only the map implementation would really care.- Specified by:
getHashin interfaceBasicEMap.Entry<K,V>
-
setHash
public void setHash(int hash) Description copied from interface:BasicEMap.EntrySets the hash code of the key. This should only be called by the map implementation, since the hash code of the key of an entry already in the map must be immutable.- Specified by:
setHashin interfaceBasicEMap.Entry<K,V> - Parameters:
hash- the hash.
-
getKey
-
setKey
Description copied from interface:BasicEMap.EntrySets the key. This should only be called by the map implementation, since the key of an entry already in the map must be immutable.- Specified by:
setKeyin interfaceBasicEMap.Entry<K,V> - Parameters:
key- the key.
-
getValue
-
setValue
-
equals
-
hashCode
public int hashCode() -
toString
-