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

tech.jhipster.lite.module.domain.properties.SpringConfigurationFormat Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.module.domain.properties;

import java.util.stream.Stream;
import tech.jhipster.lite.shared.error.domain.Assert;

public enum SpringConfigurationFormat {
  YAML("yaml"),
  PROPERTIES("properties");

  private final String format;

  SpringConfigurationFormat(String format) {
    Assert.notNull(format, "format");

    this.format = format;
  }

  public static SpringConfigurationFormat from(String input) {
    return Stream.of(values()).filter(configFormat -> configFormat.format.equals(input)).findFirst().orElse(null);
  }

  public String get() {
    return format;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy