Class FastMap.EntryImpl<K,V>

java.lang.Object
org.codehaus.plexus.util.FastMap.EntryImpl<K,V>
All Implemented Interfaces:
Map.Entry<K,V>
Enclosing class:
FastMap<K,V>

private static final class FastMap.EntryImpl<K,V> extends Object implements Map.Entry<K,V>
This class represents a FastMap entry.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Holds the entry added after this entry or the next available entry when in pool.
    Holds the entry added before this entry (null when in pool).
    private int
    Holds the bucket index (undefined when in pool).
    private K
    Holds the entry key (null when in pool).
    Holds the next entry in the same bucket (null when in pool).
    Holds the previous entry in the same bucket (null when in pool).
    private V
    Holds the entry value (null when in pool).
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object that)
    Indicates if this entry is considered equals to the specified entry.
    Returns the key for this entry.
    Returns the value for this entry.
    int
    Returns the hash code for this entry.
    setValue(V value)
    Sets the value for this entry.
    Returns the text representation of this entry.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • _key

      private K _key
      Holds the entry key (null when in pool).
    • _value

      private V _value
      Holds the entry value (null when in pool).
    • _index

      private int _index
      Holds the bucket index (undefined when in pool).
    • _previous

      private FastMap.EntryImpl _previous
      Holds the previous entry in the same bucket (null when in pool).
    • _next

      private FastMap.EntryImpl _next
      Holds the next entry in the same bucket (null when in pool).
    • _before

      private FastMap.EntryImpl _before
      Holds the entry added before this entry (null when in pool).
    • _after

      private FastMap.EntryImpl _after
      Holds the entry added after this entry or the next available entry when in pool.
  • Constructor Details

    • EntryImpl

      private EntryImpl()
  • Method Details

    • getKey

      public K getKey()
      Returns the key for this entry.
      Specified by:
      getKey in interface Map.Entry<K,V>
      Returns:
      the entry's key.
    • getValue

      public V getValue()
      Returns the value for this entry.
      Specified by:
      getValue in interface Map.Entry<K,V>
      Returns:
      the entry's value.
    • setValue

      public V setValue(V value)
      Sets the value for this entry.
      Specified by:
      setValue in interface Map.Entry<K,V>
      Parameters:
      value - the new value.
      Returns:
      the previous value.
    • equals

      public boolean equals(Object that)
      Indicates if this entry is considered equals to the specified entry.
      Specified by:
      equals in interface Map.Entry<K,V>
      Overrides:
      equals in class Object
      Parameters:
      that - the object to test for equality.
      Returns:
      true if both entry are considered equal; false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash code for this entry.
      Specified by:
      hashCode in interface Map.Entry<K,V>
      Overrides:
      hashCode in class Object
      Returns:
      this entry's hash code.
    • toString

      public String toString()
      Returns the text representation of this entry.
      Overrides:
      toString in class Object
      Returns:
      this entry's textual representation.