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

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

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

import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import tech.jhipster.lite.shared.error.domain.Assert;

public record JHipsterPropertyExample(String example) {
  public JHipsterPropertyExample {
    Assert.notBlank("example", example);
  }

  public static Optional of(String example) {
    return Optional.ofNullable(example).filter(StringUtils::isNotBlank).map(JHipsterPropertyExample::new);
  }

  public String get() {
    return example();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy