Skip to contentMethod: Tuple(Object, Object)
      1: package de.fhdw.wtf.common.ast;
2: 
3: /**
4:  * A tuple contains two items - first and second - no matter which type the items have.
5:  * 
6:  * @param <F>
7:  *            Type of first Tuple-Element
8:  * @param <S>
9:  *            Type of second Tuple-Element
10:  * 
11:  */
12: public class Tuple<F, S> {
13:         
14:         /**
15:          * First Tuple-Element.
16:          */
17:         private final F first;
18:         
19:         /**
20:          * Second Tuple-Element.
21:          */
22:         private final S second;
23:         
24:         /**
25:          * Konstruktor for {@link Tuple}.
26:          * 
27:          * @param first
28:          *            First Tuple-Element
29:          * @param second
30:          *            Second Tuple-Element
31:          */
32:         public Tuple(final F first, final S second) {
33:                 this.first = first;
34:                 this.second = second;
35:         }
36:         
37:         /**
38:          * Get the first Tuple-Element.
39:          * 
40:          * @return first Tuple-Element
41:          */
42:         public F getFirst() {
43:                 return this.first;
44:         }
45:         
46:         /**
47:          * Get the second Tuple-Element.
48:          * 
49:          * @return second Tuple-Element
50:          */
51:         public S getSecond() {
52:                 return this.second;
53:         }
54:         
55: }