mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
IDEA-163302 Suggest to use IntStream.boxed() if manually mapping to an Integer
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.DoubleStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Double> list = DoubleStream.of(1,2,3,4).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.DoubleStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Double> list = DoubleStream.of(1,2,3,4).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = IntStream.range(0, 100).boxed().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).ma<caret>pToObj(x -> x).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.DoubleStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Double> list = DoubleStream.of(1,2,3,4).map<caret>ToObj((x) -> new Double(x)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "false"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Double> list = LongStream.of(1,2,3,4).map<caret>ToObj((x) -> new Double(x)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).<Long>ma<caret>pToObj((x) -> (x)).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.DoubleStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Double> list = DoubleStream.of(1,2,3,4).m<caret>apToObj((x) -> (Double.valueOf(x))).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).map<caret>ToObj(Long::new).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "false"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = LongStream.range(0, 100).map<caret>ToObj(Double::new).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "true"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = IntStream.range(0, 100).mapT<caret>oObj(Integer::valueOf).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with 'boxed'" "false"
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
List<Integer> list = IntStream.range(0, 100).mapT<caret>oObj(Long::valueOf).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user