replaced inefficient constructors Character(char) by Character.valueOf(char)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@668117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-06-16 11:28:34 +00:00
parent 151be95053
commit 87e066ad31
1 changed files with 5 additions and 5 deletions

View File

@ -144,7 +144,7 @@ public class Frequency implements Serializable {
* @param v the value to add.
*/
public void addValue(char v) {
addValue(new Character(v));
addValue(Character.valueOf(v));
}
/** Clears the frequency table */
@ -230,7 +230,7 @@ public class Frequency implements Serializable {
* @return the frequency of v.
*/
public long getCount(char v) {
return getCount(new Character(v));
return getCount(Character.valueOf(v));
}
//-------------------------------------------------------------
@ -281,7 +281,7 @@ public class Frequency implements Serializable {
* @return the proportion of values equal to v
*/
public double getPct(char v) {
return getPct(new Character(v));
return getPct(Character.valueOf(v));
}
//-----------------------------------------------------------------------------------------
@ -369,7 +369,7 @@ public class Frequency implements Serializable {
* @return the proportion of values equal to v
*/
public long getCumFreq(char v) {
return getCumFreq(new Character(v));
return getCumFreq(Character.valueOf(v));
}
//----------------------------------------------------------------------------------------------
@ -428,7 +428,7 @@ public class Frequency implements Serializable {
* @return the proportion of values less than or equal to v
*/
public double getCumPct(char v) {
return getCumPct(new Character(v));
return getCumPct(Character.valueOf(v));
}
/**