Static methods can do type magic and save us from repeating ourselves.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2293 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2008-04-08 17:30:35 +00:00
parent e4eed9d775
commit 18e8371dac
+8
View File
@@ -35,6 +35,14 @@ public class Tuple<L,R> implements Serializable
/** The right object. */
public R right;
/**
* Creates a tuple with the specified two objects.
*/
public static <L, R> Tuple<L, R> create (L left, R right)
{
return new Tuple<L, R>(left, right);
}
/** Construct a tuple with the specified two objects. */
public Tuple (L left, R right)
{