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

tech.jhipster.lite.module.domain.landscape.JHipsterLandscapeLevel Maven / Gradle / Ivy

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

import java.util.Collection;
import java.util.Collections;
import java.util.stream.Stream;
import tech.jhipster.lite.module.domain.JHipsterSlug;
import tech.jhipster.lite.shared.error.domain.Assert;

public record JHipsterLandscapeLevel(Collection elements) {
  public JHipsterLandscapeLevel(Collection elements) {
    Assert.notEmpty("elements", elements);

    this.elements = Collections.unmodifiableCollection(elements);
  }

  public Stream slugs() {
    return elements.stream().flatMap(JHipsterLandscapeElement::slugs);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy