Open simerplaha opened 2 years ago
scala.Tuple2[T1, T2]'s equivalent in Java is KeyVal[K, V] and Pair[L, R] which requires type conversion to Tuple2 so it could be used by core.
scala.Tuple2[T1, T2]
KeyVal[K, V]
Pair[L, R]
Tuple2
Copy the implementation of scala.Tuple2[T1, T2] as a sealed trait making KeyVal[K, V] or Pair[L, R] extend it.
sealed trait
Issue
scala.Tuple2[T1, T2]
's equivalent in Java isKeyVal[K, V]
andPair[L, R]
which requires type conversion toTuple2
so it could be used by core.Solution
Copy the implementation of
scala.Tuple2[T1, T2]
as asealed trait
makingKeyVal[K, V]
orPair[L, R]
extend it.