Package com.piketec.tpt.api
Class Pair<A,B>
- java.lang.Object
-
- com.piketec.tpt.api.Pair<A,B>
-
- Type Parameters:
A
- type parameter for first element in pairB
- type parameter for second element in pair
- All Implemented Interfaces:
java.io.Serializable
public class Pair<A,B> extends java.lang.Object implements java.io.Serializable
A simple pair.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
A
getFirst()
B
getSecond()
int
hashCode()
void
setFirst(A first)
Set the first pair membervoid
setSecond(B second)
Set the second pair memberjava.lang.String
toString()
-
-
-
Method Detail
-
getFirst
public A getFirst()
- Returns:
- The first pair member
-
setFirst
public void setFirst(A first)
Set the first pair member- Parameters:
first
- The new first pair member
-
getSecond
public B getSecond()
- Returns:
- The second pair member
-
setSecond
public void setSecond(B second)
Set the second pair member- Parameters:
second
- The new second pair member
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-