Enum Class Group

java.lang.Object
java.lang.Enum<Group>
net.thauvin.erik.frankfurter.models.Group
All Implemented Interfaces:
Serializable, Comparable<Group>, Constable

public enum Group extends Enum<Group>
Represents the time period by which exchange rates can be downsampled.

Used as an optional query parameter when requesting rates over a date range. When specified, rates are aggregated over the given time period rather than returned as daily values.

The API accepts the lowercase string values "week" and "month" for this parameter.

Since:
1.0
Author:
Erik C. Thauvin
  • Enum Constant Details

    • WEEK

      @SerializedName("week") public static final Group WEEK
      Downsample rates to one value per week.
    • MONTH

      @SerializedName("month") public static final Group MONTH
      Downsample rates to one value per month.
  • Method Details

    • values

      public static Group[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Group valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      @NonNull public String value()
      Returns the API query parameter value for this group (e.g. "week", "month").
      Returns:
      the lowercase string value used in query strings