org.jopendocument.util
Class Tuple2<A,B>

java.lang.Object
  extended by org.jopendocument.util.Tuple2<A,B>
Type Parameters:
A - type of first value.
B - type of second value.
Direct Known Subclasses:
Tuple2.List2, Tuple3

public class Tuple2<A,B>
extends Object

A simple class to hold 2 values in a type-safe manner.

Author:
Sylvain

Nested Class Summary
static class Tuple2.List2<A>
           
 
Constructor Summary
Tuple2(A a, B b)
           
 
Method Summary
 List<? extends Object> asList()
           
static
<A,B> Tuple2<A,B>
create(A a, B b)
           
 boolean equals(Object obj)
           
 A get0()
           
 B get1()
           
 int hashCode()
           
static
<A,B> Tuple2<A,B>
nullInstance()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tuple2

public Tuple2(A a,
              B b)
Method Detail

nullInstance

public static final <A,B> Tuple2<A,B> nullInstance()

create

public static final <A,B> Tuple2<A,B> create(A a,
                                             B b)

get0

public final A get0()

get1

public final B get1()

asList

public List<? extends Object> asList()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 jOpenDocument All Rights Reserved.