Isomorphism/Bijection between Java and Scala types.
Useful for converting Fugue types to Scala and vice-versa.
Useful for converting Fugue types to Scala and vice-versa.
to use, simply import ScalaConverters._ and then add .toScala and .toJava as required.
Note: that the Fugue side will have Java types such as java.lang.Integer and the Scala
side will have the Scala equivalents such as Int. It will pass reference types though unchanged.
Also note that a Function[Pair[A, B], C] converts to an ((A, B)) => C – note the inner parens,
it converts to a tupled (1 arg that is a tuple) function. You can turn that into an
(A, B) => C with scala.Function.untupled _'
Note: The class was moved from package io.atlassian.fugue to io.atlassian.fugue.converters in 2.4, where 'toScala', 'toJava' has been replaced by 'toScala', 'toJava'
2.2
Isomorphism/Bijection between Java and Scala types.
Must be natural and a proper bijection, cannot be partial.