net.walend.collection
Class AbstractHashMap.SimpleEntry

java.lang.Object
  |
  +--net.walend.collection.AbstractHashMap.SimpleEntry
All Implemented Interfaces:
AbstractHashMap.Entry
Enclosing class:
AbstractHashMap

private class AbstractHashMap.SimpleEntry
extends java.lang.Object
implements AbstractHashMap.Entry

Entries for the hash map.


Field Summary
private  int hash
           
private  java.lang.Object key
           
private  AbstractHashMap.Entry next
           
private  java.lang.Object value
           
 
Constructor Summary
private AbstractHashMap.SimpleEntry(int hash, java.lang.Object key, java.lang.Object value, AbstractHashMap.Entry next)
           
 
Method Summary
 AbstractHashMap.Entry deepCopy()
           
 boolean equals(java.lang.Object o)
           
 int getHash()
           
 java.lang.Object getKey()
           
 AbstractHashMap.Entry getNext()
           
 java.lang.Object getValue()
           
 int hashCode()
           
 void recordAccess(Map m)
          This method is invoked whenever the value in an entry is overwritten by an invocation of put(k,v) for a key k that's already in the AbstractHashMap.
 void setNext(AbstractHashMap.Entry nex)
           
 void setValue(java.lang.Object val)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private java.lang.Object value

hash

private int hash

key

private java.lang.Object key

next

private AbstractHashMap.Entry next
Constructor Detail

AbstractHashMap.SimpleEntry

private AbstractHashMap.SimpleEntry(int hash,
                                    java.lang.Object key,
                                    java.lang.Object value,
                                    AbstractHashMap.Entry next)
Method Detail

getHash

public int getHash()
Specified by:
getHash in interface AbstractHashMap.Entry

getKey

public java.lang.Object getKey()
Specified by:
getKey in interface AbstractHashMap.Entry

getNext

public AbstractHashMap.Entry getNext()
Specified by:
getNext in interface AbstractHashMap.Entry

setNext

public void setNext(AbstractHashMap.Entry nex)
Specified by:
setNext in interface AbstractHashMap.Entry

recordAccess

public void recordAccess(Map m)
This method is invoked whenever the value in an entry is overwritten by an invocation of put(k,v) for a key k that's already in the AbstractHashMap.

Specified by:
recordAccess in interface AbstractHashMap.Entry

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface AbstractHashMap.Entry

setValue

public void setValue(java.lang.Object val)
Specified by:
setValue in interface AbstractHashMap.Entry

deepCopy

public AbstractHashMap.Entry deepCopy()
Specified by:
deepCopy in interface AbstractHashMap.Entry


Copyright (c) 2000, 2001, David Walend