Class Pair<E1,E2>
java.lang.Object
ch.nolix.base.datastructure.pair.Pair<E1,E2>
- Type Parameters:
E1- is the type of the element 1 of aPair.E2- is the type of the element 2 of aPair.
- All Implemented Interfaces:
IPair<E1,E2>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanhasElement1(Object object) booleanhasElement2(Object object) toString()static <T1,T2> Pair <T1, T2> withElement1AndElement2(T1 element1, T2 element2)
-
Method Details
-
withElement1AndElement2
- Type Parameters:
T1- is the type of the given element1.T2- is the type of the given element2.- Parameters:
element1-element2-- Returns:
- a new
Pairwith the given element1 and element2. - Throws:
RuntimeException- if the given element 1 is null.RuntimeException- if the given element 2 is null.
-
getStoredElement1
-
getStoredElement2
-
hasElement1
-
hasElement2
-
toString
-