com.github.reikje.specifiers.UnsignedHexadecimalInteger.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of printf-ext_2.12 Show documentation
Show all versions of printf-ext_2.12 Show documentation
Extended printf support for Scala
The newest version!
package com.github.reikje.specifiers
import java.math.BigInteger
/**
* Adds support for '''%x''' specifiers.
*
* @author rschatz
*/
object UnsignedHexadecimalInteger extends UnsignedNumericConversion {
override protected val complement: BigInteger = BigInteger.ONE.shiftLeft(32)
/**
* Returns '''%x'''.
*
* @return String
*/
override val specifier: String = "%x"
override protected def asString(value: BigInteger): String = value.toString(16)
}