All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.molr.commons.domain.Result Maven / Gradle / Ivy

/**
 * Copyright (c) 2017 European Organisation for Nuclear Research (CERN), All Rights Reserved.
 */

package io.molr.commons.domain;

public enum Result {
    UNDEFINED,
    SUCCESS,
    FAILED;

    public static final Result summaryOf(Iterable values) {
        for (Result value : values) {
            if (FAILED == value) {
                return FAILED;
            }
        }
        for (Result value : values) {
            if (UNDEFINED == value) {
                return UNDEFINED;
            }
        }
        return SUCCESS;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy