soa.sca.samples.candystore
Class Entry<K,D>

java.lang.Object
  extended by soa.sca.samples.candystore.Entry<K,D>
All Implemented Interfaces:
java.io.Serializable

public class Entry<K,D>
extends java.lang.Object
implements java.io.Serializable

Represents a key/data pair in a data collection.

See Also:
Serialized Form

Constructor Summary
Entry()
          Constructs a new entry.
Entry(K key, D data)
          Constructs a new entry.
 
Method Summary
 D getData()
          Returns the entry data.
 K getKey()
          Returns the entry key.
 void setData(D data)
          Sets the entry data
 void setKey(K key)
          Sets the entry key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entry

public Entry()
Constructs a new entry.


Entry

public Entry(K key,
             D data)
Constructs a new entry.

Parameters:
key - the entry key
data - the entry data
Method Detail

getKey

public K getKey()
Returns the entry key.

Returns:
the key

setKey

public void setKey(K key)
Sets the entry key.

Parameters:
key - the key

getData

public D getData()
Returns the entry data.

Returns:
the entry data

setData

public void setData(D data)
Sets the entry data

Parameters:
data - the entry data