commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject [6/7] [math] Remove deprecated methods in ListPopulation.
Date Thu, 19 Feb 2015 09:01:56 GMT
Remove deprecated methods in ListPopulation.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d0c62a84
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d0c62a84
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d0c62a84

Branch: refs/heads/master
Commit: d0c62a848c196325a228e0566416f8ef40c120fe
Parents: 2e462ec
Author: tn <thomas.neidhart@gmail.com>
Authored: Thu Feb 19 10:01:01 2015 +0100
Committer: tn <thomas.neidhart@gmail.com>
Committed: Thu Feb 19 10:01:01 2015 +0100

----------------------------------------------------------------------
 .../commons/math4/genetics/ListPopulation.java  | 26 --------------------
 1 file changed, 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d0c62a84/src/main/java/org/apache/commons/math4/genetics/ListPopulation.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/genetics/ListPopulation.java b/src/main/java/org/apache/commons/math4/genetics/ListPopulation.java
index b0358c9..d86680c 100644
--- a/src/main/java/org/apache/commons/math4/genetics/ListPopulation.java
+++ b/src/main/java/org/apache/commons/math4/genetics/ListPopulation.java
@@ -81,32 +81,6 @@ public abstract class ListPopulation implements Population {
     }
 
     /**
-     * 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
      * @throws NumberIsTooLargeException if the population would exceed the population limit
when


Mime
View raw message