Top Description Fields Constructors Methods
io.netty.util.internal.shaded.org.jctools.maps

pack-priv abstract Class AbstractEntry<TypeK, TypeV>

extends Object
implements Map.Entry<TypeK, TypeV>
Class Inheritance
All Implemented Interfaces
java.util.Map.Entry
Known Direct Subclasses
io.netty.util.internal.shaded.org.jctools.maps.NonBlockingHashMap.NBHMEntry, io.netty.util.internal.shaded.org.jctools.maps.NonBlockingHashMapLong.NBHMLEntry, io.netty.util.internal.shaded.org.jctools.maps.NonBlockingIdentityHashMap.NBHMEntry
Type Parameters
<TypeK>
the type of keys maintained by this map
<TypeV>
the type of mapped values
Imports
java.util.Map

A simple implementation of java.util.Map.Entry. Does not implement java.util.Map.Entry#setValue, that is done by users of the class.
Author
Cliff Click
Since
1.5

Field Summary

Modifier and TypeField and Description
protected final TypeK
_key

Strongly typed key

protected TypeV
_val

Strongly typed value

Constructor Summary

AccessConstructor and Description
public
AbstractEntry(final TypeK key, final TypeV val)

public
AbstractEntry(final Map.Entry<TypeK, TypeV> e)

Method Summary

Modifier and TypeMethod and Description
private static boolean
eq(final Object o1, final Object o2)

public boolean
equals(final Object
object to be compared for equality with this map entry
o
)

Overrides java.lang.Object.equals.

Implements java.util.Map.Entry.equals.

Equal if the underlying key & value are equal
public TypeK
getKey()

Implements java.util.Map.Entry.getKey.

Return key
public TypeV
getValue()

Implements java.util.Map.Entry.getValue.

Return val
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.Map.Entry.hashCode.

Compute "key.hashCode() ^ val.hashCode()"
public String
toString()

Overrides java.lang.Object.toString.

Return "key=val" string
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

_keyback to summary
protected final TypeK _key

Strongly typed key

_valback to summary
protected TypeV _val

Strongly typed value

Constructor Detail

AbstractEntryback to summary
public AbstractEntry(final TypeK key, final TypeV val)
AbstractEntryback to summary
public AbstractEntry(final Map.Entry<TypeK, TypeV> e)

Method Detail

eqback to summary
private static boolean eq(final Object o1, final Object o2)
equalsback to summary
public boolean equals(final Object o)

Overrides java.lang.Object.equals.

Implements java.util.Map.Entry.equals.

Equal if the underlying key & value are equal

Parameters
o:Object

Doc from java.util.Map.Entry.equals.

object to be compared for equality with this map entry

Returns:boolean

Doc from java.util.Map.Entry.equals.

true if the specified object is equal to this map entry

getKeyback to summary
public TypeK getKey()

Implements java.util.Map.Entry.getKey.

Return key

Returns:TypeK

Doc from java.util.Map.Entry.getKey.

the key corresponding to this entry

getValueback to summary
public TypeV getValue()

Implements java.util.Map.Entry.getValue.

Return val

Returns:TypeV

Doc from java.util.Map.Entry.getValue.

the value corresponding to this entry

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.Map.Entry.hashCode.

Compute "key.hashCode() ^ val.hashCode()"

Returns:int

Doc from java.util.Map.Entry.hashCode.

the hash code value for this map entry

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return "key=val" string

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object