WithRadix

scala.util.FromDigits.WithRadix
trait WithRadix[T] extends FromDigits[T]

A subclass of FromDigits that also allows to convert whole number literals with a radix other than 10

Attributes

Graph
Supertypes
trait FromDigits[T]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

Converts digits string with given radix to number of type T. E.g. if radix is 16, digits a..f and A..F are also allowed.

Converts digits string with given radix to number of type T. E.g. if radix is 16, digits a..f and A..F are also allowed.

Attributes

Concrete methods

Converts digits string to value of type T digits can contain

Converts digits string to value of type T digits can contain

  • sign + or -
  • sequence of digits between 0 and 9

Attributes

Throws
FromDigits.MalformedNumber

if digit string is not legal for the given type

FromDigits.NumberTooLarge

if value of result does not fit into T's range

FromDigits.NumberTooSmall

in case of numeric underflow (e.g. a non-zero floating point literal that produces a zero value)