
org.continuity.api.entities.config.OrderMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of continuity.api Show documentation
Show all versions of continuity.api Show documentation
Library of continuITy defining exchange entities
The newest version!
package org.continuity.api.entities.config;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
public enum OrderMode {
PAST_SESSIONS, PAST_REQUESTS, FORECASTED_WORKLOAD;
private static final Map prettyStringToMode = new HashMap<>();
static {
for (OrderMode mode : values()) {
prettyStringToMode.put(mode.toPrettyString(), mode);
}
}
@JsonCreator
public static OrderMode fromPrettyString(String key) {
return prettyStringToMode.get(key);
}
@JsonValue
public String toPrettyString() {
return name().replace("_", "-").toLowerCase();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy