File tree Expand file tree Collapse file tree
exercises/series/src/example/java Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import java .util .List ;
55import java .util .stream .Collectors ;
66
7- public class Series {
7+ class Series {
88
99 private final int digitsSize ;
1010 private List <Integer > digits ;
1111
12- public Series (String string ) {
12+ Series (String string ) {
1313 this .digits =
1414 Arrays .stream (string .split (("" )))
1515 .map (Integer ::parseInt )
1616 .collect (Collectors .toList ());
1717 this .digitsSize = this .digits .size ();
1818 }
1919
20- public List <List <Integer >> slices (int num ) {
20+ List <List <Integer >> slices (int num ) {
2121 if (num > this .digitsSize ) {
2222 throw new IllegalArgumentException ("Slice size is too big." );
2323 }
@@ -31,7 +31,7 @@ public List<List<Integer>> slices(int num) {
3131 return result ;
3232 }
3333
34- public List <Integer > getDigits () {
34+ List <Integer > getDigits () {
3535 return digits ;
3636 }
3737
You can’t perform that action at this time.
0 commit comments