diff --git a/algorithms/sequential_migration/.project b/algorithms/sequential_migration/.project index 8fdab3d..fa1a16c 100644 --- a/algorithms/sequential_migration/.project +++ b/algorithms/sequential_migration/.project @@ -1,6 +1,6 @@ - 001_sequential_migration + sequential_migration Project 001_sequential_migration created by Buildship. diff --git a/classlevel/lambdaexpressions/collections/.project b/classlevel/lambdaexpressions/collections/.project new file mode 100644 index 0000000..3f9cc92 --- /dev/null +++ b/classlevel/lambdaexpressions/collections/.project @@ -0,0 +1,23 @@ + + + collections + Project collections created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/classlevel/lambdaexpressions/collections/build.gradle b/classlevel/lambdaexpressions/collections/build.gradle new file mode 100644 index 0000000..6e34c1a --- /dev/null +++ b/classlevel/lambdaexpressions/collections/build.gradle @@ -0,0 +1,33 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This generated file contains a sample Java project to get you started. + * For more details take a look at the Java Quickstart chapter in the Gradle + * user guide available at https://docs.gradle.org/4.9/userguide/tutorial_java_projects.html + */ + +plugins { + // Apply the java plugin to add support for Java + id 'java' + + // Apply the application plugin to add support for building an application + id 'application' +} + +// Define the main class for the application +mainClassName = 'App' + +dependencies { + // This dependency is found on compile classpath of this component and consumers. + // compile 'com.google.guava:guava:23.0' + + // Use JUnit test framework + testCompile 'junit:junit:4.12' +} + +// In this section you declare where to find the dependencies of your project +repositories { + // Use jcenter for resolving your dependencies. + // You can declare any Maven/Ivy/file repository here. + jcenter() +} diff --git a/classlevel/lambdaexpressions/collections/settings.gradle b/classlevel/lambdaexpressions/collections/settings.gradle new file mode 100644 index 0000000..98c274e --- /dev/null +++ b/classlevel/lambdaexpressions/collections/settings.gradle @@ -0,0 +1,10 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * The settings file is used to specify which projects to include in your build. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user guide at https://docs.gradle.org/4.9/userguide/multi_project_builds.html + */ + +rootProject.name = 'collections' diff --git a/classlevel/lambdaexpressions/collections/src/main/java/App.java b/classlevel/lambdaexpressions/collections/src/main/java/App.java new file mode 100644 index 0000000..15b836f --- /dev/null +++ b/classlevel/lambdaexpressions/collections/src/main/java/App.java @@ -0,0 +1,17 @@ +import java.util.HashMap; +import java.util.Map; + +/* + * This Java source file was generated by the Gradle 'init' task. + */ +public class App { + + public static void main(String[] args) { + Map testlist = new HashMap(); + testlist.put("one", 1); + testlist.put("two", 2); + testlist.put("three", 3); + testlist.forEach((k, v) -> System.out.println(k + ":" + v)); + + } +} diff --git a/classlevel/lambdaexpressions/collections/src/test/java/AppTest.java b/classlevel/lambdaexpressions/collections/src/test/java/AppTest.java new file mode 100644 index 0000000..e611fc7 --- /dev/null +++ b/classlevel/lambdaexpressions/collections/src/test/java/AppTest.java @@ -0,0 +1,12 @@ +/* + * This Java source file was generated by the Gradle 'init' task. + */ +import org.junit.Test; +import static org.junit.Assert.*; + +public class AppTest { + @Test public void testAppHasAGreeting() { + App classUnderTest = new App(); + assertNotNull("app should have a greeting", classUnderTest.getGreeting()); + } +}