org.softamis.net.exchange.spi
Class ItemEntry<K extends java.io.Serializable,V extends java.io.Serializable>

java.lang.Object
  extended by org.softamis.net.exchange.spi.ItemEntry<K,V>
Type Parameters:
K - type of keys used to identify registry items
V - type of values stored in the registry
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class ItemEntry<K extends java.io.Serializable,V extends java.io.Serializable>
extends java.lang.Object
implements java.io.Externalizable

Utility class used to wrap information about item.

Author:
Andrew Sazonov
See Also:
Serialized Form

Field Summary
protected  java.lang.String fGroup
          Items group (may be used to filter not applicable notifications)
protected  K fKey
          Key of item
protected  V fValue
          Item itself
 
Constructor Summary
ItemEntry()
           
ItemEntry(K aKey, V aValue)
           
ItemEntry(java.lang.String aGroup, K aKey, V aValue)
           
 
Method Summary
 java.lang.String getGroup()
          Returns items group (may be used to filter not applicable notifications)
 K getKey()
          Returns key of item
 V getValue()
          Returns the item itself
 void readExternal(java.io.ObjectInput aIn)
           
 void setGroup(java.lang.String aGroup)
          Sets items group (may be used to filter not applicable notifications)
 void setKey(K aKey)
          Sets key of item
 void setValue(V aValue)
          Sets item itself
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput aOut)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fGroup

protected java.lang.String fGroup
Items group (may be used to filter not applicable notifications)


fKey

protected K extends java.io.Serializable fKey
Key of item


fValue

protected V extends java.io.Serializable fValue
Item itself

Constructor Detail

ItemEntry

public ItemEntry()

ItemEntry

public ItemEntry(java.lang.String aGroup,
                 K aKey,
                 V aValue)

ItemEntry

public ItemEntry(K aKey,
                 V aValue)
Method Detail

getKey

public K getKey()
Returns key of item

Returns:
key of item

setKey

public void setKey(K aKey)
Sets key of item

Parameters:
aKey - key of item

getValue

public V getValue()
Returns the item itself

Returns:
item

setValue

public void setValue(V aValue)
Sets item itself

Parameters:
aValue - item

getGroup

public java.lang.String getGroup()
Returns items group (may be used to filter not applicable notifications)

Returns:
group

setGroup

public void setGroup(java.lang.String aGroup)
Sets items group (may be used to filter not applicable notifications)

Parameters:
aGroup - items group

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput aOut)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput aIn)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException