class Subpackages implements ProgressCheckFactory {

    @Override
    public ProgressCheck newInstance(final JsonObject config) {
        List<Rule> rules = Rules.fromJsonArray(arrayOrEmpty(config, keys().rules()));

        final boolean denyAll = hasNonNull(config, keys().denyAll()) && config.getBoolean(keys().denyAll());

        return new Check(rules, denyAll);
    }

}