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

tech.jhipster.lite.module.domain.file.JHipsterFilesToDelete Maven / Gradle / Ivy

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

import java.util.Collection;
import java.util.stream.Stream;
import tech.jhipster.lite.module.domain.JHipsterProjectFilePath;
import tech.jhipster.lite.module.domain.JHipsterProjectFilesPaths;
import tech.jhipster.lite.shared.collection.domain.JHipsterCollections;
import tech.jhipster.lite.shared.error.domain.Assert;

public record JHipsterFilesToDelete(Collection files) {
  public JHipsterFilesToDelete(Collection files) {
    this.files = JHipsterCollections.immutable(files);
  }

  public Stream stream() {
    return files().stream();
  }

  public JHipsterFilesToDelete add(JHipsterProjectFilesPaths other) {
    Assert.notNull("other", other);

    return new JHipsterFilesToDelete(Stream.concat(files().stream(), other.stream()).toList());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy