You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2015/11/03 21:37:08 UTC

[2/7] [math] Replaced implementation types.

Replaced implementation types.

ArrayList -> List
TreeMap   -> SortedMap

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

Branch: refs/heads/MATH_3_X
Commit: e3118728d12b4027acb4181c6e491b7c701f67f0
Parents: a96ee63
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Nov 3 15:51:07 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Nov 3 15:53:03 2015 +0100

----------------------------------------------------------------------
 .../apache/commons/math3/geometry/euclidean/twod/NestedLoops.java | 3 ++-
 src/main/java/org/apache/commons/math3/stat/Frequency.java        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/e3118728/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/NestedLoops.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/NestedLoops.java b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/NestedLoops.java
index 929366a..83928fa 100644
--- a/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/NestedLoops.java
+++ b/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/NestedLoops.java
@@ -18,6 +18,7 @@ package org.apache.commons.math3.geometry.euclidean.twod;
 
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 import org.apache.commons.math3.exception.MathIllegalArgumentException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
@@ -50,7 +51,7 @@ class NestedLoops {
     private Vector2D[] loop;
 
     /** Surrounded loops. */
-    private ArrayList<NestedLoops> surrounded;
+    private List<NestedLoops> surrounded;
 
     /** Polygon enclosing a finite region. */
     private Region<Euclidean2D> polygon;

http://git-wip-us.apache.org/repos/asf/commons-math/blob/e3118728/src/main/java/org/apache/commons/math3/stat/Frequency.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/stat/Frequency.java b/src/main/java/org/apache/commons/math3/stat/Frequency.java
index 52f7ae4..ffdff2e 100644
--- a/src/main/java/org/apache/commons/math3/stat/Frequency.java
+++ b/src/main/java/org/apache/commons/math3/stat/Frequency.java
@@ -25,6 +25,7 @@ import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.SortedMap;
 import java.util.TreeMap;
 
 import org.apache.commons.math3.exception.MathIllegalArgumentException;
@@ -67,7 +68,7 @@ public class Frequency implements Serializable {
     private static final long serialVersionUID = -3845586908418844111L;
 
     /** underlying collection */
-    private final TreeMap<Comparable<?>, Long> freqTable;
+    private final SortedMap<Comparable<?>, Long> freqTable;
 
     /**
      * Default constructor.