org.codehaus.jparsec.functors
Class Tuples

java.lang.Object
  extended by org.codehaus.jparsec.functors.Tuples

public final class Tuples
extends Object

Creates Pair and tuple instances.

These data holders can be used to hold temporary results during parsing so you don't have to create your own data types.

Author:
Ben Yu

Constructor Summary
Tuples()
           
 
Method Summary
static
<A,B> Pair<A,B>
pair(A a, B b)
          Returns a Pair of 2 objects.
static
<A,B> Pair<A,B>
tuple(A a, B b)
          Returns a Pair of 2 objects.
static
<A,B,C> Tuple3<A,B,C>
tuple(A a, B b, C c)
          Returns a Tuple3 of 3 objects.
static
<A,B,C,D> Tuple4<A,B,C,D>
tuple(A a, B b, C c, D d)
          Returns a Tuple4 of 4 objects.
static
<A,B,C,D,E>
Tuple5<A,B,C,D,E>
tuple(A a, B b, C c, D d, E e)
          Returns a Tuple5 of 5 objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tuples

public Tuples()
Method Detail

pair

public static <A,B> Pair<A,B> pair(A a,
                                   B b)
Returns a Pair of 2 objects. Is equivalent to tuple(Object, Object).


tuple

public static <A,B> Pair<A,B> tuple(A a,
                                    B b)
Returns a Pair of 2 objects. Is equivalent to pair(Object, Object).


tuple

public static <A,B,C> Tuple3<A,B,C> tuple(A a,
                                          B b,
                                          C c)
Returns a Tuple3 of 3 objects.


tuple

public static <A,B,C,D> Tuple4<A,B,C,D> tuple(A a,
                                              B b,
                                              C c,
                                              D d)
Returns a Tuple4 of 4 objects.


tuple

public static <A,B,C,D,E> Tuple5<A,B,C,D,E> tuple(A a,
                                                  B b,
                                                  C c,
                                                  D d,
                                                  E e)
Returns a Tuple5 of 5 objects.



Copyright © 2014. All rights reserved.