摘要: 这次统一看一下scala中容器类的几个方法。 Set filter()方法 filter()方法用来从Set中过滤获取含有指定特征的元素。示例代码如下: val colors1 = Set("Blue", "Green", "Red", "yellow") val filteredSet = colors1 filter (_ contains "l") println(filteredSet m... 阅读全文
posted @ 2016-09-13 22:11 robin·张 阅读(1308) 评论(0) 推荐(0) 编辑