Skip to content

Commit

Permalink
fixed checkstyle errors about utility classes constructors
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@811780 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Luc Maisonobe committed Sep 6, 2009
1 parent 337e3fd commit 39e7aea
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,15 @@ private static void setup(UnivariateRealFunction f) {
* <p>We use here the Initialization On Demand Holder Idiom.</p>
*/
private static class LazyHolder {

/** Private constructor. */
private LazyHolder() {
}

/** Cached solver factory */
private static final UnivariateRealSolverFactory FACTORY =
UnivariateRealSolverFactory.newInstance();

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ public Complex getZero() {
* <p>We use here the Initialization On Demand Holder Idiom.</p>
*/
private static class LazyHolder {

/** Private constructor. */
private LazyHolder() {
}

/** Cached field instance. */
private static final ComplexField INSTANCE = new ComplexField();

}

/** Handle deserialization of the singleton.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ public BigFraction getZero() {
* <p>We use here the Initialization On Demand Holder Idiom.</p>
*/
private static class LazyHolder {

/** Private constructor. */
private LazyHolder() {
}

/** Cached field instance. */
private static final BigFractionField INSTANCE = new BigFractionField();

}

/** Handle deserialization of the singleton.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ public Fraction getZero() {
* <p>We use here the Initialization On Demand Holder Idiom.</p>
*/
private static class LazyHolder {

/** Private constructor. */
private LazyHolder() {
}

/** Cached field instance. */
private static final FractionField INSTANCE = new FractionField();

}

/** Handle deserialization of the singleton.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private static class AnovaStats {
* @param dfwg degrees of freedom in denominator (within groups)
* @param F statistic
*/
AnovaStats(int dfbg, int dfwg, double F) {
public AnovaStats(int dfbg, int dfwg, double F) {
this.dfbg = dfbg;
this.dfwg = dfwg;
this.F = F;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/apache/commons/math/util/BigRealField.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ public BigReal getZero() {
* <p>We use here the Initialization On Demand Holder Idiom.</p>
*/
private static class LazyHolder {

/** Private constructor. */
private LazyHolder() {
}

/** Cached field instance. */
private static final BigRealField INSTANCE = new BigRealField();

}

/** Handle deserialization of the singleton.
Expand Down

0 comments on commit 39e7aea

Please sign in to comment.