|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.util.Pair<A,B>
public class Pair<A,B>
Encapsulates a Pair of objects.
Note: The toString() method returns the toString() of
the first object. This allows for example to easily attach
data to a JList object by passing a Pair("Label", myObject).
| Field Summary | |
|---|---|
A |
first
|
B |
second
|
| Constructor Summary | |
|---|---|
Pair()
Default constructor |
|
Pair(A firstObj,
B secondObj)
Default constructor |
|
Pair(Pair<A,B> pair)
Cloning Constructor |
|
| Method Summary | |
|---|---|
int |
compareTo(Pair<A,?> o)
implements Comparable on the first element only. |
boolean |
equals(java.lang.Object obj)
|
A |
getFirst()
|
B |
getSecond()
|
int |
hashCode()
|
void |
setFirst(A firstObj)
|
void |
setSecond(B secondObj)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public A first
public B second
| Constructor Detail |
|---|
public Pair()
public Pair(A firstObj,
B secondObj)
public Pair(Pair<A,B> pair)
| Method Detail |
|---|
public void setFirst(A firstObj)
public A getFirst()
public void setSecond(B secondObj)
public B getSecond()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(Pair<A,?> o)
compareTo in interface java.lang.Comparable<Pair<A,?>>
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||