小编sec*_*129的帖子

Can not infer functional interface type in groupBy Java 8

I am not sure this has been answered earlier or not. Can anyone please tell me what is the problem with third groupBy which I've written ? Why it can not infer ?

class TestGroupBy
{
    enum LifeCycle {
        ANNUAL, PERENNIAL
    }

    private String name;
    private LifeCycle lifeCycle;

    TestGroupBy(String name, LifeCycle lifeCycle) {
        this.name = name;
        this.lifeCycle = lifeCycle;
    }

    LifeCycle getLifeCycle() {
        return this.lifeCycle;
    }

    static EnumMap mySupplier() {
        return new EnumMap(TestGroupBy.class);
    }

    public static void main(String[] args) { …
Run Code Online (Sandbox Code Playgroud)

java java-8 collectors

5
推荐指数
1
解决办法
2111
查看次数

Scala:如何在Intellij中创建单元测试用例

你能帮助我在IntelliJ中为Scala创建单元测试用例吗?

我尝试使用意图动作创建它,但它并不适合我.我也检查了设置的意图.一切看起来都不错.

我们对Scala有不同的处理方式,还是我错过了什么?

scala scalatest

1
推荐指数
1
解决办法
1909
查看次数

标签 统计

collectors ×1

java ×1

java-8 ×1

scala ×1

scalatest ×1