Files
kotlin-fork/nj2k/testData/newJ2k/javaStreamsApi/formatting.java
T
Ilya Kirillov 2bd5a1f196 New J2K: separate nullability inference from common one & nullability bug fixes
It will be needed for structure mutability inference

#KT-21467 fixed
#KT-32609 fixed
#KT-32572 fixed
#KT-24677 fixed
2019-07-25 14:34:35 +03:00

17 lines
704 B
Java
Vendored

// RUNTIME_WITH_FULL_JDK
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
class Test {
public void main(List<Integer> lst) {
List<Integer> newLst = /*before list*/lst/*after list*/./*before stream*/stream()/* after stream*/
.filter(x -> x > 10)
.map(x -> x + 2)/*some comment*/./*another comment*/distinct()/* one more comment */.sorted()/*another one comment*/
.sorted(Comparator.<Integer>naturalOrder())
.peek(x -> System.out.println(x)).limit(1)
.skip(42)/*skipped*/
/*collecting one*/./*collecting two */collect(Collectors.toList())/* cool */;
}
}