IntLike

trait IntLike[A]

An object that allows coercing conversion between Int.

Caution: this is not a lawful typeclass. Because different number representations have different maximum / minimum representable range, we cannot strictly force that fromInt . toInt = identity, although instances of IntLike should do their best at emulating isomorphism, as does Integral instances.

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def fromInt(n: Int): A
def toInt(a: A): Int