com.neeve.lang
Class XLongLinkedHashMap.Entry<V>

java.lang.Object
  extended by com.neeve.lang.XLongLinkedHashMap.Entry<V>
All Implemented Interfaces:
XCollection.Record, XLongMap.Entry<V>
Enclosing class:
XLongLinkedHashMap<V>

public static class XLongLinkedHashMap.Entry<V>
extends Object
implements XLongMap.Entry<V>, XCollection.Record

This class represents a XLongLinkedHashMap entry. Custom XLongLinkedHashMap may use a derived implementation. For example:[code] static class MyMap extends XLinkedHashMap { protected MyEntry newEntry() { return new MyEntry(); } class MyEntry extends Entry { X xxx; // Additional entry field (e.g. cross references). } }[/code]


Field Summary
static XLongLinkedHashMap.Entry<?> NULL
          Holds NULL entries (to fill empty hole).
 
Method Summary
 boolean equals(Object that)
          Indicates if this entry is considered equals to the specified entry (using default value and key equality comparator to ensure symetry).
 long getKey()
          Returns the key for this entry.
 XLongLinkedHashMap.Entry<V> getNext()
          Returns the entry after this one.
 XLongLinkedHashMap.Entry<V> getPrevious()
          Returns the entry before this one.
 V getValue()
          Returns the value for this entry.
 int hashCode()
          Returns the hash code for this entry.
 V setValue(V value)
          Sets the value for this entry.
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final XLongLinkedHashMap.Entry<?> NULL
Holds NULL entries (to fill empty hole).

Method Detail

getNext

public final XLongLinkedHashMap.Entry<V> getNext()
Returns the entry after this one.

Specified by:
getNext in interface XCollection.Record
Returns:
the next entry.

getPrevious

public final XLongLinkedHashMap.Entry<V> getPrevious()
Returns the entry before this one.

Specified by:
getPrevious in interface XCollection.Record
Returns:
the previous entry.

getKey

public final long getKey()
Returns the key for this entry.

Specified by:
getKey in interface XLongMap.Entry<V>
Returns:
the entry key.

getValue

public final V getValue()
Returns the value for this entry.

Specified by:
getValue in interface XLongMap.Entry<V>
Returns:
the entry value.

setValue

public final V setValue(V value)
Sets the value for this entry.

Specified by:
setValue in interface XLongMap.Entry<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 (using default value and key equality comparator to ensure symetry).

Specified by:
equals in interface XLongMap.Entry<V>
Overrides:
equals in class Object
Parameters:
that - the object to test for equality.
Returns:
true if both entry have equal keys and values. false otherwise.

hashCode

public int hashCode()
Returns the hash code for this entry.

Specified by:
hashCode in interface XLongMap.Entry<V>
Overrides:
hashCode in class Object
Returns:
this entry hash code.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.