Package org.jctools.maps
Class AbstractEntry<TypeK,TypeV>
- java.lang.Object
-
- org.jctools.maps.AbstractEntry<TypeK,TypeV>
-
- Type Parameters:
TypeK
- the type of keys maintained by this mapTypeV
- the type of mapped values
- All Implemented Interfaces:
java.util.Map.Entry<TypeK,TypeV>
- Direct Known Subclasses:
NonBlockingHashMap.NBHMEntry
,NonBlockingHashMapLong.NBHMLEntry
,NonBlockingIdentityHashMap.NBHMEntry
abstract class AbstractEntry<TypeK,TypeV> extends java.lang.Object implements java.util.Map.Entry<TypeK,TypeV>
A simple implementation ofMap.Entry
. Does not implementMap.Entry.setValue(V)
, that is done by users of the class.- Since:
- 1.5
-
-
Constructor Summary
Constructors Constructor Description AbstractEntry(java.util.Map.Entry<TypeK,TypeV> e)
AbstractEntry(TypeK key, TypeV val)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
eq(java.lang.Object o1, java.lang.Object o2)
boolean
equals(java.lang.Object o)
Equal if the underlying key & value are equalTypeK
getKey()
Return keyTypeV
getValue()
Return valint
hashCode()
Compute"key.hashCode() ^ val.hashCode()"
java.lang.String
toString()
Return "key=val" string
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Return "key=val" string- Overrides:
toString
in classjava.lang.Object
-
getKey
public TypeK getKey()
Return key
-
getValue
public TypeV getValue()
Return val
-
equals
public boolean equals(java.lang.Object o)
Equal if the underlying key & value are equal
-
hashCode
public int hashCode()
Compute"key.hashCode() ^ val.hashCode()"
-
eq
private static boolean eq(java.lang.Object o1, java.lang.Object o2)
-
-