- All Implemented Interfaces:
Cloneable
public class QPair<T,S>
extends Object
implements Cloneable
QPair keeps two generic values. They are public with the names
first
and second
.
-
Field Summary
Fields
Modifier and Type |
Field |
Description |
T |
first |
First value of the pair.
|
S |
second |
Second value of the pair.
|
-
Constructor Summary
Constructors
Constructor |
Description |
QPair(T t,
S s) |
Constructs a pair.
|
-
Method Summary
Modifier and Type |
Method |
Description |
QPair<T,S> |
clone() |
Returns a copy of this object.
|
boolean |
equals(Object o) |
Returns true if this pair is the same as the other pair.
|
int |
hashCode() |
|
String |
toString() |
Returns a string representation of this pair.
|
-
Field Details
-
-
Second value of the pair.
-
Constructor Details
-
Constructs a pair.
- Parameters:
t
- The first parameter.
s
- The second parameter.
-
Method Details
-
Returns true if this pair is the same as the other pair. If any
of the first or second members are null the result is false regardless.
- Overrides:
equals
in class Object
- Parameters:
o
- The other parameter
- Returns:
- True if they are equal.
-
-
Returns a string representation of this pair.
- Overrides:
toString
in class Object
-
Returns a copy of this object.
- Overrides:
clone
in class Object