Resolution.java 616 Bytes
/*
 * Decompiled with CFR 0_118.
 */
package com.day.cq.analytics.testandtarget;

import java.util.Locale;

public enum Resolution {
    HOUR,
    DAY,
    WEEK,
    MONTH;
    

    private Resolution() {
    }

    public String getTestandTargetKey() {
        return this.toString().toLowerCase(Locale.ENGLISH);
    }

    public static Resolution fromTestandTargetKey(String testandTargetKey) {
        for (Resolution resolution : Resolution.values()) {
            if (!resolution.getTestandTargetKey().equals(testandTargetKey)) continue;
            return resolution;
        }
        return null;
    }
}