CuneiPainter  Version 1.2
Tuple< T, T2 > Class Reference

Created by timo on 5/23/15. More...

Inheritance diagram for Tuple< T, T2 >:
Collaboration diagram for Tuple< T, T2 >:

Public Member Functions

int compareTo (Object o)
 
boolean equals (Object obj)
 
void setOne (final T one)
 
void setTwo (final T2 two)
 
String toString ()
 

Package Functions

 Tuple (T one, T2 two)
 
getOne ()
 
T2 getTwo ()
 

Private Attributes

one
 
T2 two
 

Detailed Description

Created by timo on 5/23/15.

Implements a tuple class of two generic types. Tuple util class. User: Timo Homburg Date: 19.11.13 Time: 22:15 To change this template use File | Settings | File Templates.

Constructor & Destructor Documentation

Tuple ( one,
T2  two 
)
package
19  {
20  this.one=one;
21  this.two=two;
22  }
T one
Definition: Tuple.java:16
T2 two
Definition: Tuple.java:17

Member Function Documentation

int compareTo ( Object  o)
25  {
26  Tuple t=(Tuple) o;
27  if(t.two== this.two && this.one==t.one)
28  return 0;
29  return 1;
30  }
Tuple(T one, T2 two)
Definition: Tuple.java:19
boolean equals ( Object  obj)
33  {
34  return obj instanceof Tuple && this.one.equals(((Tuple) obj).one) && this.two.equals(((Tuple) obj).two);
35  }
Tuple(T one, T2 two)
Definition: Tuple.java:19
T2 two
Definition: Tuple.java:17
T getOne ( )
package
37  {
38  return one;
39  }
T one
Definition: Tuple.java:16
T2 getTwo ( )
package
45  {
46  return two;
47  }
T2 two
Definition: Tuple.java:17
void setOne ( final T  one)
41  {
42  this.one = one;
43  }
T one
Definition: Tuple.java:16
void setTwo ( final T2  two)
49  {
50  this.two = two;
51  }
T2 two
Definition: Tuple.java:17
String toString ( )
54  {
55  return "["+this.one+","+this.two+"]";
56  }

Member Data Documentation

T one
private
T2 two
private