summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/lambda2methodReference/beforeCollapseToBeInferredTypeArgs.java
blob: f14712789eb7d6da4d7a439673abae7753ed2f1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// "Replace lambda with method reference" "true"
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

class Box<T>
{
  public Box(T value)
  {
    this._value = value;
  }

  private final T _value;

  public T getValue()
  {
    return this._value;
  }

  {
    List<Box<String>> l1 = new ArrayList<>();
    l1.add(new Box<>("Foo"));
    l1.add(new Box<>("Bar"));

    List<String> l3 = l1.stream()
      .map((t) -> t.get<caret>Value())
      .collect(Collectors.toList());
  }
}