|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.SimpleMapEntry
com.tangosol.util.InvocableMapHelper.SimpleEntry
public static class InvocableMapHelper.SimpleEntry
Simple implementation of the InvocableMap.Entry interface. This assumes that the underlying Map content does not change while a reference to the SimpleEntry is alive and may cache the entry's value to avoid an extra map lookup.
Field Summary | |
---|---|
protected java.util.Map |
m_map The map. |
Fields inherited from class com.tangosol.util.SimpleMapEntry |
---|
m_oKey, m_oOrigValue, m_oValue, NO_VALUE |
Constructor Summary | |
---|---|
InvocableMapHelper.SimpleEntry(java.util.Map map, java.lang.Object oKey, boolean fReadOnly) Construct a SimpleEntry for a given map and a key. |
|
InvocableMapHelper.SimpleEntry(java.lang.Object oKey, java.lang.Object oValue) Construct a SimpleEntry for a given key and value. |
Method Summary | |
---|---|
protected void |
checkMutable() Verify that this SimpleEntry is mutable. |
boolean |
equals(java.lang.Object o) Compare this SimpleEntry with another object for equality. |
java.lang.Object |
getValue() Returns the value corresponding to this entry. |
int |
hashCode() Return a hash code value for the SimpleEntry object. |
boolean |
isPresent() Determine if this Entry exists in the Map. |
void |
remove(boolean fSynthetic) Remove this Entry from the Map if it is present in the Map. |
java.lang.Object |
setValue(java.lang.Object oValue) Replaces the value corresponding to this entry with the specified value (optional operation). |
void |
setValue(java.lang.Object oValue, boolean fSynthetic) Store the value corresponding to this entry. |
java.lang.String |
toString() Provide a human-readable representation of the SimpleEntry object. |
Methods inherited from class com.tangosol.util.SimpleMapEntry |
---|
clone, extract, getKey, getOriginalValue, isOriginalPresent, update |
Field Detail |
---|
protected java.util.Map m_map
Constructor Detail |
---|
public InvocableMapHelper.SimpleEntry(java.util.Map map, java.lang.Object oKey, boolean fReadOnly)
map
- the parent Map for this entryoKey
- the entry's keyfReadOnly
- if true, the entry will be marked as read-only, preventing the setValue() and remove() methods from modifying the underlying map's contentpublic InvocableMapHelper.SimpleEntry(java.lang.Object oKey, java.lang.Object oValue)
oKey
- the entry's keyoValue
- the entry's valueMethod Detail |
---|
public java.lang.Object getValue()
getValue
in interface InvocableMap.Entry
getValue
in interface java.util.Map.Entry
getValue
in class SimpleMapEntry
public java.lang.Object setValue(java.lang.Object oValue)
setValue
in interface InvocableMap.Entry
setValue
in interface java.util.Map.Entry
setValue
in class SimpleMapEntry
oValue
- new value to be stored in this entrypublic void setValue(java.lang.Object oValue, boolean fSynthetic)
Unlike the other form of setValue
, this form does not return the previous value, and as a result may be significantly less expensive (in terms of cost of execution) for certain Map implementations.
setValue
in interface InvocableMap.Entry
setValue
in class SimpleMapEntry
oValue
- the new value for this EntryfSynthetic
- pass true only if the insertion into or modification of the Map should be treated as a synthetic eventpublic boolean isPresent()
InvocableMap.Entry.setValue(Object)
or InvocableMap.Entry.setValue(Object, boolean)
. If the Entry is present, it can be destroyed by calling InvocableMap.Entry.remove(boolean)
.isPresent
in interface InvocableMap.Entry
isPresent
in class SimpleMapEntry
public void remove(boolean fSynthetic)
This method supports both the operation corresponding to Map.remove(java.lang.Object)
as well as synthetic operations such as eviction. If the containing Map does not differentiate between the two, then this method will always be identical to InvocableMap.this.remove(getKey()).
remove
in interface InvocableMap.Entry
remove
in class SimpleMapEntry
fSynthetic
- pass true only if the removal from the Map should be treated as a synthetic eventpublic boolean equals(java.lang.Object o)
equals
in interface java.util.Map.Entry
equals
in class SimpleMapEntry
o
- an object reference or nullpublic int hashCode()
hashCode
in interface java.util.Map.Entry
hashCode
in class SimpleMapEntry
public java.lang.String toString()
toString
in class SimpleMapEntry
protected void checkMutable()
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |