private Optional<Integer> getMonitoringInterval(Element monitoringE) {
        String seconds = monitoringE.getAttribute("interval").trim();
        if ( ! seconds.isEmpty()) {
            int m = Integer.parseInt(seconds) / 60;
            if ( ! List.of(1, 5).contains(m)) {
                throw new IllegalArgumentException("The only allowed values for 'interval' attribute in '" +
                                                   monitoringE.getTagName() + "' element is 60 or 300.");
            }
            return Optional.of(m);
        }

        return Optional.empty();
    }
A base class for admin model builders, to support common functionality across versions.

@author Ulf Lilleengen
@author Vegard Havdal
config-model/src/main/java/com/yahoo/vespa/model/builder/xml/dom/DomAdminBuilderBase.java