|
Berkeley DB version 4.2.52 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.sleepycat.bdb.collection.MapEntry
A simple Map.Entry implementation.
Warning: Use of this interface violates the Java Collections
interface contract since these state that Map.Entry objects should only be
obtained from Map.entrySet() sets, while this class allows constructing them
directly. However, it is useful for performing operations on an entry set
such as add(), contains(), etc. For restrictions see getValue() and
setValue(java.lang.Object).
| Constructor Summary | |
MapEntry(Object key,
Object value)
Creates a map entry with a given key and value. |
|
| Method Summary | |
boolean |
equals(Object other)
Compares this entry to a given entry as specified by Map.Entry.equals(java.lang.Object). |
Object |
getKey()
Returns the key of this entry. |
Object |
getValue()
Returns the value of this entry. |
int |
hashCode()
Computes a hash code as specified by Map.Entry.hashCode(). |
Object |
setValue(Object newValue)
Changes the value of this entry. |
String |
toString()
Converts the entry to a string representation for debugging. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public MapEntry(Object key,
Object value)
key - is the key to use.value - is the value to use.| Method Detail |
public int hashCode()
Map.Entry.hashCode().
hashCode in interface Map.EntryhashCode in class Objectpublic boolean equals(Object other)
Map.Entry.equals(java.lang.Object).
equals in interface Map.Entryequals in class Objectpublic final Object getKey()
getKey in interface Map.Entrypublic final Object getValue()
setValue(java.lang.Object).
It will not reflect changes made to a Map.
getValue in interface Map.Entrypublic Object setValue(Object newValue)
setValue in interface Map.Entrypublic String toString()
toString in class Object
|
Berkeley DB version 4.2.52 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||