mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
24 lines
658 B
Java
24 lines
658 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.IntSummaryStatistics;
|
|
import java.util.stream.IntStream;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Main {
|
|
public static IntSummaryStatistics test() {
|
|
IntSummaryStatistics stat = new IntSummaryStatistics();
|
|
for (int limit = 0; limit < 20; limit++) {
|
|
long limitInner = limit;
|
|
for (String x = ""; ; x = x + limit) {
|
|
if (limitInner-- == 0) break;
|
|
int length = x.length();
|
|
stat.accept(length);
|
|
}
|
|
}
|
|
return stat;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test());
|
|
}
|
|
} |