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

org.knowm.xchange.bitmex.BitmexPrompt Maven / Gradle / Ivy

The newest version!
package org.knowm.xchange.bitmex;

/** Delivery dates for future date currencies */
public enum BitmexPrompt {
  PERPETUAL("perpetual"),
  DAILY("daily"),
  WEEKLY("weekly"),
  MONTHLY("monthly"),
  QUARTERLY("quarterly"),
  BIQUARTERLY("biquarterly");

  private final String name;

  /** Private constructor so it cannot be instantiated */
  BitmexPrompt(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 - 2024 Weber Informatics LLC | Privacy Policy