* @throws NumberIsTooLargeException if the list of chromosomes exceeds the population limit
* @throws NotPositiveException if the population limit is not a positive number (< 1)
*/
public ListPopulation(final List<Chromosome> chromosomes, final int populationLimit) {
if (chromosomes.size() > populationLimit) {
throw new NumberIsTooLargeException(LocalizedFormats.LIST_OF_CHROMOSOMES_BIGGER_THAN_POPULATION_SIZE,
chromosomes.size(), populationLimit, false);
}
if (populationLimit <= 0) {
throw new NotPositiveException(LocalizedFormats.POPULATION_LIMIT_NOT_POSITIVE, populationLimit);
}