/*
 * Distribution - characterization of list level where a distribution takes place
 *
 * Created on 12.02.2009
 * Copyright (c) 2009 Kiesraad
 */
package de.ivu.wahl.result.result;

/**
 * Enum for the different types of seat distributions.
 *
 * @author , IVU Traffic Technologies AG
 */
public enum Distribution {
  P2(2), P3(3);

  int id;

  Distribution(final int id) {
    this.id = id;
  }

  public int getId() {
    return id;
  }

  public static Distribution byId(int id) {
    for (Distribution distribution : Distribution.values()) {
      if (id == distribution.getId()) {
        return distribution;
      }
    }
    return null;
  }
}
