TFirst - The type of the first element in the pair.TSecond - The type of the second element in the pair.public class Pair<TFirst,TSecond> extends java.lang.Object implements IEquatable<Pair<TFirst,TSecond>>
| Constructor and Description |
|---|
Pair(Pair<TFirst,TSecond> pair)
Constructs a new instance of the Pair class from another Pair object.
|
Pair(TFirst first,
TSecond second)
Initializes a new instance of the Pair class containing
the specified objects.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests whether this instance is equal to a specified object.
|
boolean |
Equals(Pair<TFirst,TSecond> other)
Tests whether this instance is equal to a specified pair.
|
TFirst |
First()
Gets the first object of the pair.
|
IStreamable<Pair<TFirst,TSecond>> |
GetStreamAdaptor()
Returns an instance that implements the IStreamable<Pair> interface.
|
int |
hashCode()
Returns the hash code for this instance.
|
TSecond |
Second()
Gets the second object of the pair.
|
void |
SetFirst(TFirst value)
Sets the first object of the pair.
|
void |
SetSecond(TSecond value)
Sets the second object of the pair.
|
java.lang.String |
toString()
Converts the value of this instance to its equivalent
string representation.
|
public Pair(TFirst first, TSecond second)
first - The first object initializing the first element of the pair.second - The second object initializing the second element of the pair.public TFirst First()
public void SetFirst(TFirst value)
value - The first value to be set.public TSecond Second()
public void SetSecond(TSecond value)
value - The second value to be set.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - An object to compare with this instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean Equals(Pair<TFirst,TSecond> other)
Equals in interface IEquatable<Pair<TFirst,TSecond>>other - A pair to compare with this instance.public java.lang.String toString()
toString in class java.lang.Objectpublic IStreamable<Pair<TFirst,TSecond>> GetStreamAdaptor()
Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.