Package org.drasyl.util
Class Pair<A,B> 
java.lang.Object
org.drasyl.util.Pair<A,B> 
- All Implemented Interfaces:
 Serializable
A tuple of two elements.
 
Inspired by: https://github.com/javatuples/javatuples/blob/master/src/main/java/org/javatuples/Pair.java
- See Also:
 
- 
Method Summary
 
- 
Method Details
- 
hashCode
public int hashCode() - 
equals
 - 
toString
 - 
first
- Returns:
 - the first element
 
 - 
second
- Returns:
 - the second element
 
 - 
of
Obtains a tuple of two elements inferring the generic types.
This factory allows the pair to be created using inference to obtain the generic types.
- Type Parameters:
 A- the first element typeB- the second element type- Parameters:
 first- the first element, may be nullsecond- the second element, may be null- Returns:
 - a pair formed from the two parameters, not null
 
 
 -