CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation

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.
 Object getKey()
          Returns the key corresponding to this entry.
protected abstract  Converter getKeyUpConv()
          Return the Converter to view the underlying Entry's key through.
 Object getValue()
          Returns the value corresponding to this entry.
protected abstract  Converter getValueDownConv()
          Return the Converter used to change value in the underlying Entry.
protected abstract  Converter getValueUpConv()
          Return the Converter to view the underlying Entry's value through.
 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

getKeyUpConv

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

Returns:
the Converter to view the underlying Entry's key through

getValueUpConv

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

Returns:
the Converter to view the underlying Entry's value through

getValueDownConv

protected abstract Converter getValueDownConv()
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

toString

public String toString()
Return a String description for this Entry.

Returns:
a String description of the Entry

CoherenceTM v3.3
Copyright© 2000-2007 by Oracle Corporation