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

com.breuninger.boot.jobs.domain.Level Maven / Gradle / Ivy

There is a newer version: 2.0.5.RELEASE
Show newest version
package com.breuninger.boot.jobs.domain;

import lombok.Getter;

@Getter
public enum Level {
  INFO("info"), WARNING("warning"), ERROR("error");

  private final String key;

  Level(final String key) {
    this.key = key;
  }

  public static Level ofKey(final String s) {
    for (final var l : Level.values()) {
      if (l.getKey().equalsIgnoreCase(s)) {
        return l;
      }
    }
    throw new IllegalArgumentException("no level with this key found");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy