Kaynağa Gözat

Changes access modifier to packe private for Series example class

Ilya Khadykin 9 yıl önce
ebeveyn
işleme
cf198f4dd3

+ 4
- 4
exercises/series/src/example/java/Series.java Dosyayı Görüntüle

4
 import java.util.List;
4
 import java.util.List;
5
 import java.util.stream.Collectors;
5
 import java.util.stream.Collectors;
6
 
6
 
7
-public class Series {
7
+class Series {
8
 
8
 
9
     private final int digitsSize;
9
     private final int digitsSize;
10
     private List<Integer> digits;
10
     private List<Integer> digits;
11
 
11
 
12
-    public Series(String string) {
12
+    Series(String string) {
13
         this.digits =
13
         this.digits =
14
                 Arrays.stream(string.split(("")))
14
                 Arrays.stream(string.split(("")))
15
                         .map(Integer::parseInt)
15
                         .map(Integer::parseInt)
17
         this.digitsSize = this.digits.size();
17
         this.digitsSize = this.digits.size();
18
     }
18
     }
19
 
19
 
20
-    public List<List<Integer>> slices(int num) {
20
+    List<List<Integer>> slices(int num) {
21
         if (num > this.digitsSize) {
21
         if (num > this.digitsSize) {
22
             throw new IllegalArgumentException("Slice size is too big.");
22
             throw new IllegalArgumentException("Slice size is too big.");
23
         }
23
         }
31
         return result;
31
         return result;
32
     }
32
     }
33
 
33
 
34
-    public List<Integer> getDigits() {
34
+    List<Integer> getDigits() {
35
         return digits;
35
         return digits;
36
     }
36
     }
37
 
37