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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user