| java.lang.Object | |
| ↳ | com.google.gdata.util.common.base.Pair<A, B> |
Pair is an expedient way to combine two arbitrary objects into one. Its
use is not to be preferred to creating a custom type, but it can be
handy in a pinch. If your equals(Object), hashCode(),
toString(), and/or clone() behavior matter to you at all, you
may not want to use this (or you may at least wish to subclass).
This class may be used with the Google Web Toolkit (GWT).
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| long | serialVersionUID | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| first | The first element of the pair. | ||||||||||
| second | The second element of the pair. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Cumbersome way to create a new pair (see
of(A, B). | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Optional accessor method for
first. | |||||||||||
Optional accessor method for
second. | |||||||||||
Creates a new pair containing the given objects in order.
| |||||||||||
This implementation returns the String representation of this pair in
the form
(string1, string2), where string1 and
string2 are the toString() representations of the
elements inside the pair. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
The first element of the pair.
The second element of the pair.
Cumbersome way to create a new pair (see of(A, B).
| first | |
|---|---|
| second |
| object |
|---|
Creates a new pair containing the given objects in order.
| first | |
|---|---|
| second |
This implementation returns the String representation of this pair in
the form (string1, string2), where string1 and
string2 are the toString() representations of the
elements inside the pair.