Open
Description
http://docs.scala-lang.org/overviews/core/value-classes.html#extension-methods
This section should show the two available options:
package object foo {
implicit class RichInt(val self: Int) extends AnyVal {
def toHexString: String = java.lang.Integer.toHexString(self)
}
}
or
object Foo {
implicit class RichInt(val self: Int) extends AnyVal {
def toHexString: String = java.lang.Integer.toHexString(self)
}
}