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

com.github.libgraviton.workerbase.model.status.Status Maven / Gradle / Ivy

package com.github.libgraviton.workerbase.model.status;

import java.util.Arrays;
import java.util.List;

/**
 * @author List of contributors
 *         https://github.com/libgraviton/graviton/graphs/contributors
 * @see http://swisscom.ch
 */
public enum Status {
    OPEN("opened"),
    IGNORED("ignored"),
    WORKING("working"),
    DONE("done"),
    FAILED("failed");

    private static List terminatedStates = Arrays.asList(DONE, FAILED, IGNORED);

    private String value;

    Status(final String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public boolean isTerminatedState() {
        return terminatedStates.contains(this);
    }

    @Override
    public String toString() {
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy