org.knowm.xchange.okcoin.FuturesContract Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xchange-okcoin Show documentation
Show all versions of xchange-okcoin Show documentation
XChange implementation for OKCoin
package org.knowm.xchange.okcoin;
/** Delivery dates for future date currencies */
public enum FuturesContract {
ThisWeek("this_week"),
NextWeek("next_week"),
Month("month"),
Quarter("quarter");
private final String name;
/** Private constructor so it cannot be instantiated */
FuturesContract(String name) {
this.name = name;
}
public static > T valueOfIgnoreCase(Class enumeration, String name) {
for (T enumValue : enumeration.getEnumConstants()) {
if (enumValue.name().equalsIgnoreCase(name)) {
return enumValue;
}
}
throw new IllegalArgumentException(
String.format("There is no value with name '%s' in Enum %s", name, enumeration.getName()));
}
public String getName() {
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy