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

tech.jhipster.lite.module.domain.javabuildprofile.BuildProfileActivation Maven / Gradle / Ivy

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

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

public final class BuildProfileActivation {

  private final Optional activeByDefault;

  public BuildProfileActivation(BuildProfileActivationBuilder builder) {
    this.activeByDefault = Optional.ofNullable(builder.activeByDefault);
  }

  public Optional activeByDefault() {
    return activeByDefault;
  }

  public static BuildProfileActivationBuilder builder() {
    return new BuildProfileActivationBuilder();
  }

  public static final class BuildProfileActivationBuilder {

    private Boolean activeByDefault;

    private BuildProfileActivationBuilder() {}

    public BuildProfileActivationBuilder activeByDefault() {
      return activeByDefault(true);
    }

    public BuildProfileActivationBuilder activeByDefault(Boolean activeByDefault) {
      Assert.notNull("activeByDefault", activeByDefault);
      this.activeByDefault = activeByDefault;
      return this;
    }

    public BuildProfileActivation build() {
      return new BuildProfileActivation(this);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy