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

de.focus_shift.jollyday.jackson.JacksonConfiguration Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package de.focus_shift.jollyday.jackson;

import de.focus_shift.jollyday.core.spi.Configuration;
import de.focus_shift.jollyday.core.spi.Holidays;

import java.util.stream.Stream;


public class JacksonConfiguration implements Configuration {

  private final de.focus_shift.jollyday.jackson.mapping.Configuration xmlConfiguration;

  public JacksonConfiguration(de.focus_shift.jollyday.jackson.mapping.Configuration xmlConfiguration) {
    this.xmlConfiguration = xmlConfiguration;
  }

  @Override
  public Holidays holidays() {
    return new JacksonHolidays(xmlConfiguration.getHolidays());
  }

  @Override
  public Stream subConfigurations() {
    return xmlConfiguration.getSubConfigurations().stream().map(JacksonConfiguration::new);
  }

  @Override
  public String hierarchy() {
    return xmlConfiguration.getHierarchy();
  }

  @Override
  public String description() {
    return xmlConfiguration.getDescription();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy