public String getString(List<String> keyAliases, String defaultValue,
        Predicate<String> constraint, String message) {

        AliasValueEntry candidate = getValue(keyAliases);
        if (candidate == null || StringUtils.isBlank(candidate.value)) {
            return defaultValue;
        }
        if (!constraint.test(candidate.value)) {
            throw InvalidOptionConfigurationException
                .constraintFailure(candidate.alias, "string", candidate.value, message);
        }
        return candidate.value;
    }
Parse a string from the options using the key aliases.

@param keyAliases   the key aliases
@param defaultValue the default value
@param constraint   the constraint that the value should obey
@param message      a human-readable message to describe the constraint and display in the case of a
                    constraint violation.
@return the parsed long, or the default value if none found
@throws InvalidOptionConfigurationException if a constraint violation occurs (e.g. {@code
                                        X.startsWith('foo')}).
common/config/src/main/java/io/apiman/common/config/options/GenericOptionsParser.java