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

com.firefly.utils.log.MaxSplitTimeEnum Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.firefly.utils.log;

import java.util.Arrays;
import java.util.Optional;

/**
 * @author Pengtao Qiu
 */
public enum MaxSplitTimeEnum {
    MINUTE("minute"), HOUR("hour"), DAY("day");

    private final String value;

    MaxSplitTimeEnum(String value) {
        this.value = value;
    }

    public static Optional from(String value) {
        return Arrays.stream(MaxSplitTimeEnum.values()).filter(e -> e.value.equals(value)).findFirst();
    }

    public String getValue() {
        return value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy