Package com.jackmeng.locale
Class Pair<T,E>
java.lang.Object
com.jackmeng.locale.Pair<T,E>
- Direct Known Subclasses:
Trio
This class dedicates a Map style data structure,
however it is not a list-like data structure.
- Since:
- 3.0
- Author:
- Jack Meng
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFirst()
Retrieves the first elementint
Retrieves the second element
-
Field Details
-
first
-
second
-
-
Constructor Details
-
Pair
Constructs the Pair object- Parameters:
first
- First element of T type (generic)second
- Second element of E type (generic)
-
-
Method Details
-
getFirst
Retrieves the first element- Returns:
- The first element returned as the original T type (generic)
-
getSecond
Retrieves the second element- Returns:
- The second element returned as the original E type (generic)
-
getHashCode
public int getHashCode()- Returns:
- int
-