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

cz.active24.client.fred.data.common.domain.PeriodUnit Maven / Gradle / Ivy

There is a newer version: 2.50
Show newest version
package cz.active24.client.fred.data.common.domain;

/**
 * The unit the period is counted in; it can be either m for months or y for years.
 *
 * @see FRED documentation
 */
public enum PeriodUnit {

    Y("y"),
    M("m");

    private final String value;

    PeriodUnit(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static PeriodUnit fromValue(String v) {
        for (PeriodUnit c: PeriodUnit.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy