Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created April 6, 2016 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshcough/30c23cf0956637c99f5b8a0a58ea5a78 to your computer and use it in GitHub Desktop.
Save joshcough/30c23cf0956637c99f5b8a0a58ea5a78 to your computer and use it in GitHub Desktop.
object JNumber {
def apply(value: BigDecimal): JNumber = JNumber(value.toString)
def apply(value: BigInt): JNumber = JNumber(value.toString)
def apply(value: Byte): JNumber = JNumber(value.toString)
def apply(value: Double): JNumber = JNumber(value.toString)
def apply(value: Float): JNumber = JNumber(value.toString)
def apply(value: Int): JNumber = JNumber(value.toInt.toString)
def apply(value: Integer): JNumber = JNumber(value.toString)
def apply(value: Long): JNumber = JNumber(value.toString)
def apply(value: Short): JNumber = JNumber(value.toString)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment