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.
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