org.exolab.castor.mapping
Class MapItem<K,V>

java.lang.Object
  extended by org.exolab.castor.mapping.MapItem<K,V>

public class MapItem<K,V>
extends Object

Represents a Mapped Object. This Class allows for more control over the key used in Maps and Hashtables.

Version:
$Revision: 9059 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
Author:
Keith Visco

Constructor Summary
MapItem()
          Creates a new empty MapItem.
MapItem(K key, V value)
          Creates a new MapItem with the given key and value.
 
Method Summary
 K getKey()
          Returns the key Object for this MapItem, or null if no key has been specified.
 V getValue()
          Returns the value Object for this MapItem, or null if no value has yet been specified.
 void setKey(K key)
          Sets the key for this MapItem.
 void setValue(V value)
          Sets the value for this MapItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapItem

public MapItem()
Creates a new empty MapItem.


MapItem

public MapItem(K key,
               V value)
Creates a new MapItem with the given key and value.

Parameters:
key - the key Object for this MapItem.
value - the value for this MapItem.
Method Detail

getKey

public K getKey()
Returns the key Object for this MapItem, or null if no key has been specified.

Returns:
the key Object for this MapItem.

getValue

public V getValue()
Returns the value Object for this MapItem, or null if no value has yet been specified.

Returns:
the value Object for this MapItem.

setKey

public void setKey(K key)
Sets the key for this MapItem.

Parameters:
key - the key Object for this MapItem.

setValue

public void setValue(V value)
Sets the value for this MapItem.

Parameters:
value - the value Object for this MapItem.


Copyright © 2013. All Rights Reserved.