private void extractBounds()

in module/geb-core/src/main/groovy/geb/content/PageContentTemplateParams.groovy [136:152]


    private void extractBounds(Map paramsToProcess) {
        if (paramsToProcess.containsKey(TIMES)) {
            throwIfOptionSpecifiedWithTimes(paramsToProcess, MAX)
            throwIfOptionSpecifiedWithTimes(paramsToProcess, MIN)
        }
        if (paramsToProcess.containsKey(MIN) && paramsToProcess.containsKey(MAX) && paramsToProcess[MIN] > paramsToProcess[MAX]) {
            throwInvalidContent('''contains 'max' option that is lower than the 'min' option''')
        }
        def times = paramsToProcess.remove(TIMES)
        def notRequired = paramsToProcess[REQUIRED] == false || (!paramsToProcess.containsKey(REQUIRED) && config.required.present && !config.required.get())
        def explicitlyRequired = paramsToProcess[REQUIRED]
        def defaultMin = notRequired ? 0 : (explicitlyRequired ? 1 : config.min.orElse(1))
        def timesMin = times != null ? minTimes(times) : defaultMin
        def timesMax = times != null ? maxTimes(times) : config.max.orElse(Integer.MAX_VALUE)
        max = toNonNegativeInt(paramsToProcess, MAX, timesMax)
        min = toNonNegativeInt(paramsToProcess, MIN, Math.min(max, timesMin))
    }