Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.util
Class Tuple<T1,T2>

java.lang.Object
  extended by oracle.javatools.util.Tuple<T1,T2>

public class Tuple<T1,T2>
extends java.lang.Object

A generic immutable 2-tuple. The most common term for a 2-tuple is "pair"


Constructor Summary
Tuple(T1 object1, T2 object2)
          Creates a new 2-tuple.
 
Method Summary
 boolean equals(java.lang.Object object)
          Gets whether this tuple equals an object.
 int hashCode()
          Gets the hash code of this tuple.
 T1 object1()
          Gets the first object of this tuple.
 T2 object2()
          Gets the second object of this tuple.
 java.lang.String toString()
           
static
<T1,T2> Tuple<T1,T2>
tuple(T1 object1, T2 object2)
          Creates a new 2-tuple.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tuple

public Tuple(T1 object1,
             T2 object2)
Creates a new 2-tuple.

Parameters:
object1 - The first object of the tuple.
object2 - The second object of the tuple.
Method Detail

tuple

public static <T1,T2> Tuple<T1,T2> tuple(T1 object1,
                                         T2 object2)
Creates a new 2-tuple.

Parameters:
object1 - The first object of the tuple.
object2 - The second object of the tuple.

object1

public T1 object1()
Gets the first object of this tuple.


object2

public T2 object2()
Gets the second object of this tuple.


hashCode

public int hashCode()
Gets the hash code of this tuple. The hash code is computed from both objects.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Gets whether this tuple equals an object. To be equal, the object must be a tuple, the two first objects must be equal, and the two second objects must be equal.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.