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

tech.jhipster.lite.module.domain.javabuild.command.JavaBuildCommands Maven / Gradle / Ivy

There is a newer version: 1.18.1
Show newest version
package tech.jhipster.lite.module.domain.javabuild.command;

import static tech.jhipster.lite.shared.collection.domain.JHipsterCollections.*;

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

public record JavaBuildCommands(Collection commands) {
  public static final JavaBuildCommands EMPTY = new JavaBuildCommands(List.of());

  public JavaBuildCommands(Collection commands) {
    this.commands = immutable(commands);
  }

  public JavaBuildCommands merge(JavaBuildCommands other) {
    Assert.notNull("other", other);

    return new JavaBuildCommands(concat(commands(), other.commands()));
  }

  public boolean isEmpty() {
    return get().isEmpty();
  }

  @SuppressWarnings("unchecked")
  public Collection get() {
    return (Collection) commands();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy