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

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class SvgLegende implements Serializable {

  private final SvgText header;

  private final List<SvgLegendEntryMitPosition> entries = new ArrayList<>();

  private final SvgTranslate translate;

  public SvgLegende(SvgText header, SvgTranslate translate) {
    this.header = header;
    this.translate = translate;
  }

  public SvgTranslate getTranslate() {
    return translate;
  }

  public SvgText getHeader() {
    return header;
  }

  public boolean isHeaderPresent() {
    return getHeader()!=null;
  }

  public List<SvgLegendEntryMitPosition> getEntries() {
    return entries;
  }

  public void addSvgLegendEntryMitPosition(SvgLegendEntryMitPosition entryMitPosition){
    entries.add(entryMitPosition);
  }
}
