Skip to content

Commit 3c4d5a6

Browse files
author
duanmenghua
committed
提交
1 parent 96fe8a4 commit 3c4d5a6

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

test/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.iluwatar</groupId>
8+
<artifactId>test</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<plugin>
11+
<groupId>org.apache.maven.plugins</groupId>
12+
<artifactId>maven-compiler-plugin</artifactId>
13+
<version>3.3</version>
14+
<configuration>
15+
<source>1.8</source>
16+
<target>1.8</target>
17+
</configuration>
18+
</plugin>
19+
20+
21+
22+
</project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.ronly.lambda;
2+
3+
import java.util.LinkedList;
4+
import java.util.List;
5+
import java.util.stream.Collectors;
6+
7+
/**
8+
* Created by duanmenghua on 2017-07-24.
9+
*/
10+
public class Lambda {
11+
public static void main(String[] args) {
12+
13+
List<Integer> result = new LinkedList<>();
14+
result.add(1);
15+
result.add(3);
16+
result.add(4);
17+
result.add(7);
18+
result.add(5);
19+
result.add(7);
20+
List<Integer> collect = result.stream().filter(x -> x > 3).distinct().collect(Collectors.toList());
21+
System.out.println(collect);
22+
23+
24+
}
25+
}

test/test.iml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
4+
<output url="file://$MODULE_DIR$/target/classes" />
5+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6+
<content url="file://$MODULE_DIR$">
7+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9+
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10+
<excludeFolder url="file://$MODULE_DIR$/target" />
11+
</content>
12+
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
13+
<orderEntry type="sourceFolder" forTests="false" />
14+
</component>
15+
</module>

0 commit comments

Comments
 (0)