Skip to content

Commit a2183e4

Browse files
committed
Removing all CheckStyle issues
1 parent b559923 commit a2183e4

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/main/java/com/thealgorithms/maths/MathBuilder.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
*/
1313
public final class MathBuilder {
1414
private final double result;
15+
1516
private MathBuilder(Builder builder) {
1617
this.result = builder.number;
1718
}
19+
1820
// Returns final result
1921
public double get() {
2022
return result;
2123
}
24+
2225
// Return result in long
2326
public long toLong() {
2427
try {
@@ -46,12 +49,15 @@ public long toLong() {
4649
public static class Builder {
4750
private double number;
4851
private double memory = 0;
52+
4953
public Builder() {
5054
number = 0;
5155
}
56+
5257
public Builder(double num) {
5358
number = num;
5459
}
60+
5561
public Builder add(double num) {
5662
number += num;
5763
return this;
@@ -324,7 +330,8 @@ public Builder format(String format) {
324330
}
325331

326332
public Builder format(int decimalPlace) {
327-
String pattern = "." + "#".repeat(decimalPlace);
333+
String pattern = "."
334+
+ "#".repeat(decimalPlace);
328335
DecimalFormat formater = new DecimalFormat(pattern);
329336
String num = formater.format(number);
330337
number = Double.parseDouble(num);

src/test/java/com/thealgorithms/maths/MathBuilderTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.thealgorithms.maths;
22

3-
import org.junit.jupiter.api.Test;
4-
53
import static org.junit.jupiter.api.Assertions.assertEquals;
64
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
75

6+
import org.junit.jupiter.api.Test;
7+
88
class MathBuilderTest {
99

1010
@Test

src/test/java/com/thealgorithms/others/TestPrintMatrixInSpiralOrder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.thealgorithms.others;
22

3-
import java.util.List;
3+
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
44

5+
import java.util.List;
56
import org.junit.jupiter.api.Test;
67

7-
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
88

99
public class TestPrintMatrixInSpiralOrder {
1010
@Test

0 commit comments

Comments
 (0)