class SecurityAnalysisTool implements Tool {

    static void updateInput(ToolOptions options, SecurityAnalysisExecutionInput inputs) {
        options.getPath(PARAMETERS_FILE_OPTION)
                .ifPresent(f -> JsonSecurityAnalysisParameters.update(inputs.getParameters(), f));

        options.getPath(CONTINGENCIES_FILE_OPTION)
                .map(p -> FileUtil.asByteSource(p))
                .ifPresent(inputs::setContingenciesSource);

        options.getValues(LIMIT_TYPES_OPTION)
                .map(types -> types.stream().map(LimitViolationType::valueOf).collect(Collectors.toList()))
                .ifPresent(inputs::addViolationTypes);

        options.getValues(WITH_EXTENSIONS_OPTION)
                .ifPresent(inputs::addResultExtensions);
    }

}