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

tech.jhipster.lite.module.domain.replacement.ContentReplacers Maven / Gradle / Ivy

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

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

public record ContentReplacers(Collection replacers) {
  public ContentReplacers {
    Assert.field("replacers", replacers).notNull().noNullElement();
  }

  public static ContentReplacers of(ContentReplacer... replacers) {
    Assert.field("replacers", replacers).notNull();
    return new ContentReplacers(List.of(replacers));
  }

  public void forEach(Consumer action) {
    replacers().forEach(action);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy