Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.util
Class ConverterCollections.AbstractConverterEntry

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.ConverterCollections.AbstractConverterEntry

All Implemented Interfaces:
Serializable, Map.Entry
Direct Known Subclasses:
ConverterCollections.ConverterEntry, ConverterCollections.ConverterEntrySet.ConverterEntry
Enclosing class:
ConverterCollections

protected abstract static class ConverterCollections.AbstractConverterEntry
extends Base
implements Map.Entry, Serializable

An abstract Map Entry that lazily converts the key and value.


Field Summary
protected  Map.Entry m_entry
          The underlying entry.
protected  Object m_oKeyUp
          Cached converted key.
protected  Object m_oValueUp
          Cached converted value.

 

Constructor Summary
protected ConverterCollections.AbstractConverterEntry(Map.Entry entry)
          Constructor.

 

Method Summary
 boolean equals(Object o)
          Compares the specified object with this entry for equality.
protected abstract  Converter getConverterKeyUp()
          Return the Converter to view the underlying Entry's key through.
protected abstract  Converter getConverterValueDown()
          Return the Converter used to change value in the underlying Entry.
protected abstract  Converter getConverterValueUp()
          Return the Converter to view the underlying Entry's value through.
 Map.Entry getEntry()
          Return the underlying Map.Entry.
 Object getKey()
          Returns the key corresponding to this entry.
 Object getValue()
          Returns the value corresponding to this entry.
 int hashCode()
          Returns the hash code value for this map entry.
 Object setValue(Object value)
          Replaces the value corresponding to this entry with the specified value.
 String toString()
          Return a String description for this Entry.

 

Field Detail

m_entry

protected Map.Entry m_entry
The underlying entry.

m_oKeyUp

protected transient Object m_oKeyUp
Cached converted key.

m_oValueUp

protected transient Object m_oValueUp
Cached converted value.

Constructor Detail

ConverterCollections.AbstractConverterEntry

protected ConverterCollections.AbstractConverterEntry(Map.Entry entry)
Constructor.
Parameters:
entry - the Entry to wrap

Method Detail

getConverterKeyUp

protected abstract Converter getConverterKeyUp()
Return the Converter to view the underlying Entry's key through.
Returns:
the Converter to view the underlying Entry's key through

getConverterValueUp

protected abstract Converter getConverterValueUp()
Return the Converter to view the underlying Entry's value through.
Returns:
the Converter to view the underlying Entry's value through

getConverterValueDown

protected abstract Converter getConverterValueDown()
Return the Converter used to change value in the underlying Entry.
Returns:
the Converter used to change value in the underlying Entry

getKey

public Object getKey()
Returns the key corresponding to this entry.
Specified by:
getKey in interface Map.Entry
Returns:
the key corresponding to this entry

getValue

public Object getValue()
Returns the value corresponding to this entry.
Specified by:
getValue in interface Map.Entry
Returns:
the value corresponding to this entry

setValue

public Object setValue(Object value)
Replaces the value corresponding to this entry with the specified value.
Specified by:
setValue in interface Map.Entry
Parameters:
value - new value to be stored in this entry
Returns:
old value corresponding to the entry
Throws:
ClassCastException - if the class of the specified value prevents it from being stored in the backing map

equals

public boolean equals(Object o)
Compares the specified object with this entry for equality.
Specified by:
equals in interface Map.Entry
Parameters:
o - object to be compared for equality with this map entry
Returns:
true if the specified object is equal to this map entry

hashCode

public int hashCode()
Returns the hash code value for this map entry.
Specified by:
hashCode in interface Map.Entry
Returns:
the hash code value for this map entry
See Also:
Object.hashCode(), Object.equals(Object), Map.Entry.equals(Object)

toString

public String toString()
Return a String description for this Entry.
Returns:
a String description of the Entry

getEntry

public Map.Entry getEntry()
Return the underlying Map.Entry.
Returns:
the underlying Map.Entry

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.