|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.util.ObjectPair<F,S>
F
- The type of the first object.S
- The type of the second object.@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ObjectPair<F,S>
This class provides a typed pair of objects. It may be used whenever two objects are required but only one is allowed (e.g., returning two values from a method).
Constructor Summary | |
---|---|
ObjectPair(F first,
S second)
Creates a new object pair with the provided elements. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this object pair. |
F |
getFirst()
Retrieves the first object in this pair. |
S |
getSecond()
Retrieves the second object in this pair. |
int |
hashCode()
Retrieves a hash code for this object pair. |
java.lang.String |
toString()
Retrieves a string representation of this object pair. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this object pair to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectPair(F first, S second)
first
- The first object in this pair.second
- The second object in this pair.Method Detail |
---|
public F getFirst()
public S getSecond()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if the provided object is equal to this object pair,
or false
if not.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the information should be appended.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |