【问题标题】:Is there any LINQ like implementation in java? [duplicate]java中有没有类似LINQ的实现? [复制]
【发布时间】:2011-01-08 05:45:07
【问题描述】:

就像 C# 为我提供 LINQ 一样,Java 中是否有任何包或预处理器?

【问题讨论】:

    标签: c# java linq


    【解决方案1】:

    简单地说,不。查看Jon Skeet's answer.

    【讨论】:

      【解决方案2】:

      嗯……是的!见https://github.com/nicholas22/jpropel-light

        // create alphabet char[]
        new Character('A').to(new Character('Z')).unbox();
      
        // join two arrays and put in list 
        alphabet.join(numerics).toList(); 
      
        // select distinct j* names, using LINQ-style statements
        new String[] { "james", "john", "john", "eddie" }.where(startsWith("j")).distinct();
      

      【讨论】:

        猜你喜欢
        • 2016-05-05
        • 2011-01-01
        • 2010-09-23
        • 1970-01-01
        • 2014-11-24
        • 2013-04-23
        • 1970-01-01
        • 2013-07-11
        • 1970-01-01
        相关资源
        最近更新 更多