trait
Bijection[A, B] extends (A) ⇒ B
Abstract Value Members
-
abstract
def
apply(a: A): B
-
abstract
def
invert(b: B): A
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
-
def
andThen[A](g: (B) ⇒ A): (A) ⇒ A
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
def
compose[A](g: (A) ⇒ A): (A) ⇒ B
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
inverse: Bijection[B, A]
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
def
unapply(b: B): Option[A]
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
A bijection is a function for which every value in its codomain (set of all possible results) is equivalent to application of the function on a unique value in its domain (all possible inputs). This trait in particular provides an interface for functions that can be 'unapplied' as well as applied. A codec that can convert to and from a set of objects and their serialized form is an example of a bijection.
(Since version 2014-06-05) Prefer using com.twitter.bijection.Bijection