Errai 3.0.1-SNAPSHOT

org.jboss.errai.ioc.client.container
Class Tuple<K,V>

java.lang.Object
  extended by org.jboss.errai.ioc.client.container.Tuple<K,V>

public class Tuple<K,V>
extends Object

A simple tuple implementation meant to hold a key-value pair.

Author:
Mike Brock

Method Summary
 K getKey()
          Returns the key.
 V getValue()
          Returns the value.
static
<K,V> Tuple<K,V>
of(K k, V v)
          Creates a new Tuple.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static <K,V> Tuple<K,V> of(K k,
                                  V v)
Creates a new Tuple. Either the key or value can be null.

Type Parameters:
K - the key type
V - the value type
Parameters:
k - the key
v - the value
Returns:
an instance of Tuple.

getKey

public K getKey()
Returns the key. May be null.

Returns:

getValue

public V getValue()
Returns the value. May be null.

Returns:

toString

public String toString()
Overrides:
toString in class Object

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.