/*
 * Election
 *
 * Created on 16.12.2008
 * Copyright (c) 2008 Kiesraad
 */
package de.ivu.wahl.result;

import de.ivu.wahl.wus.electioncategory.ElectionSubcategory;

import java.util.Collection;
import java.util.Map;

/**
 * Basic information about the election including the electoral districts.
 * <p>
 * Immutable.
 *
 * @author , IVU Traffic Technologies AG
 */
public interface Election {

  /**
   * @return The number of seats to be assigned in the election
   */
  long getNumberOfSeats();

  /**
   * getPreferencialBarrierNumerator() and getPreferencialBarrierDenominator() determine the
   * fraction of preferential barrier and electoral quota. This fraction is 1/1 for the EK
   * election,1/10 for the EP election, 1/2 for community councils with less than 19 seats and 1/4
   * for all other election types.
   */
  long getPreferencialBarrierNumerator();

  /**
   * getPreferencialBarrierNumerator() and getPreferencialBarrierDenominator() determine the
   * fraction of preferential barrier and electoral quota. This fraction is 1/1 for the EK election,
   * 1/10 for the EP election, 1/2 for community councils with less than 19 seats and 1/4 for all
   * other election types.
   */
  long getPreferencialBarrierDenominator();

  /**
   * @return Unmodifiable collection of the ElectoralDistricts
   */
  Collection<ElectoralDistrict> getElectoralDistricts();

  /**
   * @return Unmodifieable Map of the ElectoralDistricts with their external keys.
   */
  Map<Object, ElectoralDistrict> getElectoralDistrictsByExternalKeys();

  /**
   * @return the type of election
   */
  ElectionSubcategory getElectionSubcategory();
}