T1
- the first element of the PairT2
- the second element of the Pair@NotThreadSafe public class Pair<T1,T2> extends Object
Constructor and Description |
---|
Pair()
Default constructor for deserialization.
|
Pair(T1 first,
T2 second)
Constructs and initializes a Pair specified by the two input elements.
|
public Pair(T1 first, T2 second)
first
- the first element of the pair (of type First)second
- the second element of the pair (of type Second)public Pair()
public T1 getFirst()
public T2 getSecond()
public void setFirst(T1 first)
first
- the value to be setpublic void setSecond(T2 second)
second
- the value to be setCopyright © 2023. All Rights Reserved.