|
org.netbeans.modules.editor.util/1 1.17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.lib.editor.util.CompactMap.MapEntry<K,V>
Abstract implementation of the map entry.
This is suitable for the cases when e.g. the value is a primitive
data type.
Constructor Summary | |
---|---|
CompactMap.MapEntry()
|
Method Summary | |
---|---|
boolean |
equals(Object o)
Implementation that adheres to Map.Entry.equals(Object) contract. |
abstract K |
getKey()
|
abstract V |
getValue()
|
int |
hashCode()
Implementation that adheres to Map.Entry.hashCode() contract. |
int |
keyHashCode()
Get stored hash code of the key contained in this entry. |
CompactMap.MapEntry<K,V> |
nextMapEntry()
Get next map entry linked to this one. |
abstract V |
setValue(V value)
|
protected abstract boolean |
valueEquals(Object value2)
Used by equals(Object) to check whether the value
held by this map entry equals to the the given value. |
protected abstract int |
valueHashCode()
Used by hashCode() to return the real hashCode for the value
held by this map entry. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompactMap.MapEntry()
Method Detail |
---|
public abstract K getKey()
public abstract V getValue()
public abstract V setValue(V value)
protected abstract int valueHashCode()
hashCode()
to return the real hashCode for the value
held by this map entry.
getValue().hashCode
cannot be used in general because
getValue()
may return this
e.g. in case
the value is represented by primitive data type. The method should
use that real value for the hash code computation.
protected abstract boolean valueEquals(Object value2)
equals(Object)
to check whether the value
held by this map entry equals to the the given value.
getValue().equals()
cannot be used in general because
getValue()
may return this
e.g. in case
the value is represented by primitive data type. The method should
use that real value for the operation of this method.
value2
- value to be compared with value stored in this entry.
The argument may be null.public final CompactMap.MapEntry<K,V> nextMapEntry()
CompactMap.getFirstEntry(int)
.
public final int keyHashCode()
CompactMap.getFirstEntry(int)
to quickly exclude entries which hash code differs from the requested one.
public final int hashCode()
Map.Entry.hashCode()
contract.
public final boolean equals(Object o)
Map.Entry.equals(Object)
contract.
|
org.netbeans.modules.editor.util/1 1.17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |