System.Collections.Generic
Class KeyValuePair<TKey,TValue>

java.lang.Object
  extended by System.Collections.Generic.KeyValuePair<TKey,TValue>

public class KeyValuePair<TKey,TValue>
extends java.lang.Object

Defines a key/value pair that can be set or retrieved.

Author:
Halofreak1990

Constructor Summary
KeyValuePair(TKey key, TValue value)
          Initializes a new instance of the KeyValuePair<,> structure with the specified key and value.
 
Method Summary
 TKey getKey()
          Gets the key in the key/value pair.
 TValue getValue()
          Gets the value in the key/value pair.
 java.lang.String ToString()
          Returns a string representation of the KeyValuePair<,>, using the string representations of the key and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyValuePair

public KeyValuePair(TKey key,
                    TValue value)
Initializes a new instance of the KeyValuePair<,> structure with the specified key and value.

Parameters:
key - The definition associated with key.
value - The definition associated with value.
Method Detail

getKey

public TKey getKey()
Gets the key in the key/value pair.

Returns:
A TKey that is the key of the KeyValuePair<,>

getValue

public TValue getValue()
Gets the value in the key/value pair.

Returns:
A TValue that is the value of the KeyValuePair<,>

ToString

public java.lang.String ToString()
Returns a string representation of the KeyValuePair<,>, using the string representations of the key and value.

Returns:
A string representation of the KeyValuePair<,>, which includes the string representations of the key and value.