bibliothek.util.container
Class Tuple<A,B>

java.lang.Object
  extended by bibliothek.util.container.Single<A>
      extended by bibliothek.util.container.Tuple<A,B>
Type Parameters:
A - type of the first field
B - type of the second field
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Triple

public class Tuple<A,B>
extends Single<A>

An object containing two generic fields.

Author:
Benjamin Sigg

Constructor Summary
Tuple()
           
Tuple(A a, B b)
           
 
Method Summary
 Tuple<A,B> clone()
           
 boolean equals(Object o)
           
 B getB()
           
 int hashCode()
           
static
<A,B> Tuple<A,B>
of(A a, B b)
           
 void setB(B b)
           
 String toString()
           
 
Methods inherited from class bibliothek.util.container.Single
getA, setA
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tuple

public Tuple()

Tuple

public Tuple(A a,
             B b)
Method Detail

of

public static <A,B> Tuple<A,B> of(A a,
                                  B b)

setB

public void setB(B b)

getB

public B getB()

clone

public Tuple<A,B> clone()
Overrides:
clone in class Single<A>

equals

public boolean equals(Object o)
Overrides:
equals in class Single<A>

hashCode

public int hashCode()
Overrides:
hashCode in class Single<A>

toString

public String toString()
Overrides:
toString in class Single<A>