final
case class
Equivalence[A, B](to: (A) ⇒ B, from: (B) ⇒ A) extends Product with Serializable
Instance Constructors
-
new
Equivalence(to: (A) ⇒ B, from: (B) ⇒ A)
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
-
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
-
val
from: (B) ⇒ A
-
final
def
getClass(): Class[_]
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
val
to: (A) ⇒ B
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
An
Equivalence[A, B]
defines an equivalence between two typesA
andB
. These types represent different ways to store the same information.For example, a
List[Byte]
is equivalent to aVector[Byte]
. Similarly, aList[Char]
is equivalent to aString
.Equivalences are symmetrical. So if
A
is equivalent toB
, thenB
is equivalent toA
.A function that converts an
A
into aB
.A function that converts a
B
into anA
.