浏览代码

largest-series-product: make classes and methods package private #1052 (#1067)

* make classes and methods package private #1052

* method accessor changes
Saatvik Arya 8 年前
父节点
当前提交
822636c7a1

+ 3
- 3
exercises/largest-series-product/.meta/src/reference/java/LargestSeriesProductCalculator.java 查看文件

1
-public final class LargestSeriesProductCalculator {
1
+final class LargestSeriesProductCalculator {
2
 
2
 
3
     private final String stringToSearch;
3
     private final String stringToSearch;
4
 
4
 
5
-    public LargestSeriesProductCalculator(final String stringToSearch) throws IllegalArgumentException {
5
+    LargestSeriesProductCalculator(final String stringToSearch) throws IllegalArgumentException {
6
         this.stringToSearch = stringToSearch;
6
         this.stringToSearch = stringToSearch;
7
         validateStringToSearch();
7
         validateStringToSearch();
8
     }
8
     }
9
 
9
 
10
-    public long calculateLargestProductForSeriesLength(final int seriesLength) throws IllegalArgumentException {
10
+    long calculateLargestProductForSeriesLength(final int seriesLength) throws IllegalArgumentException {
11
         if (seriesLength < 0) {
11
         if (seriesLength < 0) {
12
             throw new IllegalArgumentException("Series length must be non-negative.");
12
             throw new IllegalArgumentException("Series length must be non-negative.");
13
         } else if (seriesLength == 0) {
13
         } else if (seriesLength == 0) {