class SensitivityAnalysisResult {

    public Collection<SensitivityValue> getSensitivityValuesByFunction(SensitivityFunction function) {
        return sensitivityValues.stream().filter(sensitivityValue -> sensitivityValue.getFactor().getFunction().equals(function))
                .collect(Collectors.toList());
    }

    @JsonCreator public  SensitivityAnalysisResult(@JsonProperty("ok") boolean ok,
                                     @JsonProperty("metrics") Map<String, String> metrics,
                                     @JsonProperty("logs") String logs,
                                     @JsonProperty("values") List<SensitivityValue> sensitivityValues,
                                     @JsonProperty("contingenciesValues") Map<String, List<SensitivityValue>> sensitivityValuesContingencies);
    public  SensitivityAnalysisResult(boolean ok,
                                     Map<String, String> metrics,
                                     String logs,
                                     List<SensitivityValue> sensitivityValues);

}