protected Number parseNumber()

in module/geb-core/src/main/groovy/geb/module/NumberLikeInput.groovy [43:54]


    protected Number parseNumber(String string) {
        if (string == null || string.empty) {
            return null
        }
        if (string.bigDecimal) {
            return string.toBigDecimal()
        }
        if (string.integer) {
            return string.toInteger()
        }
        throw new NumberFormatException("Value \"${string}\" of ${this} is not a number.")
    }