Skip to content

Commit 13e36bc

Browse files
committed
Refactors lambda in Series constructor
1 parent ecccc5b commit 13e36bc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

exercises/series/src/example/java/Series.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ public class Series {
1010
private List<Integer> digits;
1111

1212
public Series(String string) {
13-
this.digits = Arrays
14-
.asList(string.split(("")))
15-
.stream()
16-
.map(digit -> Integer.parseInt(digit))
17-
.collect(Collectors.toList());
13+
this.digits =
14+
Arrays.stream(string.split(("")))
15+
.map(Integer::parseInt)
16+
.collect(Collectors.toList());
1817
this.digitsSize = this.digits.size();
1918
}
2019

0 commit comments

Comments
 (0)