protected static class

AbstractHashedMap.HashEntry

extends Object
implements Map.Entry<K, V> KeyValue
java.lang.Object
   ↳ org.apache.commons.collections.map.AbstractHashedMap.HashEntry
Known Direct Subclasses

Class Overview

HashEntry used to store the data.

If you subclass AbstractHashedMap but not HashEntry then you will not be able to access the protected fields. The entryXxx() methods on AbstractHashedMap exist to provide the necessary access.

Summary

Fields
protected int hashCode The hash code of the key
protected Object key The key
protected AbstractHashedMap.HashEntry next The next entry in the hash chain
protected Object value The value
Protected Constructors
AbstractHashedMap.HashEntry(AbstractHashedMap.HashEntry next, int hashCode, Object key, Object value)
Public Methods
boolean equals(Object obj)
Object getKey()
Gets the key from the pair.
Object getValue()
Gets the value from the pair.
int hashCode()
Object setValue(Object value)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map.Entry
From interface org.apache.commons.collections.KeyValue

Fields

protected int hashCode

The hash code of the key

protected Object key

The key

protected AbstractHashedMap.HashEntry next

The next entry in the hash chain

protected Object value

The value

Protected Constructors

protected AbstractHashedMap.HashEntry (AbstractHashedMap.HashEntry next, int hashCode, Object key, Object value)

Public Methods

public boolean equals (Object obj)

public Object getKey ()

Gets the key from the pair.

Returns
  • the key

public Object getValue ()

Gets the value from the pair.

Returns
  • the value

public int hashCode ()

public Object setValue (Object value)

public String toString ()