package de.ivu.elect.dokumente.kandidatur.statistik;

/**
 *  on 14.11.2016.
 */
public class Altersgruppe {
    private final int min;
    private final int max;
    private final String name;

    public Altersgruppe(int min, int max, String name) {
        this.min = min;
        this.max = max;
        this.name = name;
    }

    public Altersgruppe(int min, int max) {
        this(min, max, min + " - " + max);
    }

    public int getMin() {
        return min;
    }

    public int getMax() {
        return max;
    }

    public String getName() {
        return name;
    }

    public boolean contains(int value) {
        return min <= value && value <= max;
    }
}
