org.omnaest.utils.tuple
Class TupleDuad<T1,T2>

java.lang.Object
  extended by org.omnaest.utils.tuple.TupleDuad<T1,T2>
All Implemented Interfaces:
Tuple

public class TupleDuad<T1,T2>
extends Object
implements Tuple

Two arguments Tuple

Author:
Omnaest
See Also:
Tuple

Field Summary
protected  T1 valueFirst
           
protected  T2 valueSecond
           
 
Constructor Summary
TupleDuad()
           
TupleDuad(T1 valueFirst, T2 valueSecond)
           
 
Method Summary
 Map<T1,T2> asMap()
          Returns a Map containing an entry based on this Tuple.
 T1 getValueFirst()
          Returns the first value of the Tuple.
 T2 getValueSecond()
          Returns the second value of the Tuple.
 void setValueFirst(T1 valueFirst)
          Sets the first value of the Tuple.
 void setValueSecond(T2 valueSecond)
          Sets the second value of the Tuple.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valueFirst

protected T1 valueFirst

valueSecond

protected T2 valueSecond
Constructor Detail

TupleDuad

public TupleDuad()

TupleDuad

public TupleDuad(T1 valueFirst,
                 T2 valueSecond)
Method Detail

getValueFirst

public T1 getValueFirst()
Returns the first value of the Tuple.

Returns:

setValueFirst

public void setValueFirst(T1 valueFirst)
Sets the first value of the Tuple.

Parameters:
valueFirst -

getValueSecond

public T2 getValueSecond()
Returns the second value of the Tuple.

Returns:

setValueSecond

public void setValueSecond(T2 valueSecond)
Sets the second value of the Tuple.

Parameters:
valueSecond -

asMap

public Map<T1,T2> asMap()
Returns a Map containing an entry based on this Tuple.

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.