Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.collections.map
Class AbstractHashedMap.HashEntry

    java.lang.Object
      org.apache.commons.collections.map.AbstractHashedMap.HashEntry

All Implemented Interfaces:
  java.util.Map.Entry, KeyValue

Direct Known Subclasses:
  AbstractLinkedMap.LinkEntry, AbstractReferenceMap.ReferenceEntry, IdentityMap.IdentityEntry

Enclosing class:
  AbstractHashedMap

    protected static class AbstractHashedMap.HashEntry

extends java.lang.Object
implements java.util.Map.Entry, KeyValue

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.

Field Summary
`protected int` | `hashCode` The hash code of the key
`protected java.lang.Object` | `key` The key
`protected AbstractHashedMap.HashEntry` | `next` The next entry in the hash chain
`protected java.lang.Object` | `value` The value

Constructor Summary
`protected` | `AbstractHashedMap.HashEntry(AbstractHashedMap.HashEntry next, int hashCode, java.lang.Object key, java.lang.Object value)`

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`java.lang.Object` | `getKey()` Gets the key from the pair.
`java.lang.Object` | `getValue()` Gets the value from the pair.
`int` | `hashCode()`
`java.lang.Object` | `setValue(java.lang.Object value)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### next

    protected AbstractHashedMap.HashEntry next

  The next entry in the hash chain

### hashCode

    protected int hashCode

  The hash code of the key

### key

    protected java.lang.Object key

  The key

### value

    protected java.lang.Object value

  The value

Constructor Detail

### AbstractHashedMap.HashEntry

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

Method Detail

### getKey

    public java.lang.Object getKey()

  Description copied from interface: `KeyValue`
  Gets the key from the pair.

  Specified by:
    `getKey` in interface `java.util.Map.Entry`
  Specified by:
    `getKey` in interface `KeyValue`
  Returns:
    the key

### getValue

    public java.lang.Object getValue()

  Description copied from interface: `KeyValue`
  Gets the value from the pair.

  Specified by:
    `getValue` in interface `java.util.Map.Entry`
  Specified by:
    `getValue` in interface `KeyValue`
  Returns:
    the value

### setValue

    public java.lang.Object setValue(java.lang.Object value)

  Specified by:
    `setValue` in interface `java.util.Map.Entry`

### equals

    public boolean equals(java.lang.Object obj)

  Specified by:
    `equals` in interface `java.util.Map.Entry`
  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `java.util.Map.Entry`
  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.