tech.jhipster.lite.project.domain.ModulesSlugs Maven / Gradle / Ivy
package tech.jhipster.lite.project.domain;
import java.util.Collection;
import tech.jhipster.lite.shared.error.domain.Assert;
public record ModulesSlugs(Collection modules) {
public ModulesSlugs {
Assert.notEmpty("modules", modules);
}
public static ModulesSlugs from(Collection modules) {
return new ModulesSlugs(modules.stream().map(ModuleSlug::new).toList());
}
}