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

org.continuity.api.entities.links.SessionsStatus Maven / Gradle / Ivy

package org.continuity.api.entities.links;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

public enum SessionsStatus {
	
	CHANGED, NOT_CHANGED;

	private static final Map prettyStringToApproach = new HashMap<>();

	static {
		for (SessionsStatus status : values()) {
			prettyStringToApproach.put(status.toPrettyString(), status);
		}
	}

	@JsonCreator
	public static SessionsStatus fromPrettyString(String key) {
		return prettyStringToApproach.get(key);
	}

	@JsonValue
	public String toPrettyString() {
		return toString().replace("_", "-").toLowerCase();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy