SwayDB icon indicating copy to clipboard operation
SwayDB copied to clipboard

Java KeyVal and Pair should not require type conversions

Open simerplaha opened this issue 4 years ago • 0 comments

Issue

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.

Solution

Copy the implementation of scala.Tuple2[T1, T2] as a sealed trait making KeyVal[K, V] or Pair[L, R] extend it.

simerplaha avatar Nov 11 '21 14:11 simerplaha