package de.ivu.elect.business.gebietsbaum.entity;

import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;

/**
 * on 12.01.2016.
 */
public class SvgGebietPropertiesMitLegende implements Serializable {

  private static final long serialVersionUID = 1L;

  private final Function<Gebiet, SvgGebietProperties> svgGebietPropertiesFunction;

  private final Function<Collection<Gebiet>, List<SvgLegendEntry>> legendEntriesFunction;

  public SvgGebietPropertiesMitLegende(Function<Gebiet, SvgGebietProperties> svgGebietPropertiesFunction) {
    this(svgGebietPropertiesFunction, g -> Collections.emptyList());
  }

  public SvgGebietPropertiesMitLegende(Function<Gebiet, SvgGebietProperties> svgGebietPropertiesFunction, Function<Collection<Gebiet>, List<SvgLegendEntry>> legendEntriesFunction) {
    this.svgGebietPropertiesFunction = svgGebietPropertiesFunction;
    this.legendEntriesFunction = legendEntriesFunction;
  }

  public Function<Gebiet, SvgGebietProperties> getSvgGebietPropertiesFunction() {
    return svgGebietPropertiesFunction;
  }

  public Function<Collection<Gebiet>, List<SvgLegendEntry>> getLegendEntriesFunction() {
    return legendEntriesFunction;
  }
}
