Remove deprecated methods in ListPopulation.

This commit is contained in:
tn 2015-02-19 10:01:01 +01:00
parent 2e462ec48b
commit d0c62a848c
1 changed files with 0 additions and 26 deletions

View File

@ -80,32 +80,6 @@ public abstract class ListPopulation implements Population {
this.chromosomes.addAll(chromosomes);
}
/**
* Sets the list of chromosomes.
* <p>
* Note: this method removed all existing chromosomes in the population and adds all chromosomes
* of the specified list to the population.
*
* @param chromosomes the list of chromosomes
* @throws NullArgumentException if the list of chromosomes is {@code null}
* @throws NumberIsTooLargeException if the list of chromosomes exceeds the population limit
* @deprecated use {@link #addChromosomes(Collection)} instead
*/
@Deprecated
public void setChromosomes(final List<Chromosome> chromosomes)
throws NullArgumentException, NumberIsTooLargeException {
if (chromosomes == null) {
throw new NullArgumentException();
}
if (chromosomes.size() > populationLimit) {
throw new NumberIsTooLargeException(LocalizedFormats.LIST_OF_CHROMOSOMES_BIGGER_THAN_POPULATION_SIZE,
chromosomes.size(), populationLimit, false);
}
this.chromosomes.clear();
this.chromosomes.addAll(chromosomes);
}
/**
* Add a {@link Collection} of chromosomes to this {@link Population}.
* @param chromosomeColl a {@link Collection} of chromosomes