8000 GitHub - AdoptOpenJDK/lambda-tutorial: Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release

License

Notifications You must be signed in to change notification settings

AdoptOpenJDK/lambda-tutorial

{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":9321151,"defaultBranch":"master","name":"lambda-tutorial","ownerLogin":"AdoptOpenJDK","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2013-04-09T12:53:24.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1673867?v=4","public":true,"private":false,"isOrgOwned":true},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1613677082.530594","canEdit":false,"refType":"branch","currentOid":"dc4585d33f5910409ff180ffbc07614f7d6a3850"},"tree":{"items":[{"name":"src","path":"src","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"pom.xml","path":"pom.xml","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":6,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/AdoptOpenJDK/lambda-tutorial/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/AdoptOpenJDK/lambda-tutorial.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone AdoptOpenJDK/lambda-tutorial","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2FAdoptOpenJDK%2Flambda-tutorial","zipballUrl":"/AdoptOpenJDK/lambda-tutorial/archive/refs/heads/master.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=9321151"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"94","overviewFiles":[{"displayName":"README.md","repoName":"lambda-tutorial","refName":"master","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLambda Tutorial \u003ca href=\"https://travis-ci.org/AdoptOpenJDK/lambda-tutorial\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/5e606bfb0117fdd6fb65f45c60e2882397aca43c50f53f6b7063c524658e4111/68747470733a2f2f7472617669732d63692e6f72672f41646f70744f70656e4a444b2f6c616d6264612d7475746f7269616c2e706e673f6272616e63683d6d6173746572\" alt=\"Build Status\" data-canonical-src=\"https://travis-ci.org/AdoptOpenJDK/lambda-tutorial.png?branch=master\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/h2\u003e\u003ca id=\"user-content-lambda-tutorial-\" class=\"anchor\" aria-label=\"Permalink: Lambda Tutorial \" href=\"#lambda-tutorial-\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA set of exercises to teach use of Java 8 lambda syntax, and the Streams API.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo follow the exercises:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003efork and clone the repository\u003c/li\u003e\n\u003cli\u003eensure you have a correctly configured, JDK8+ build\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eMaven can help generate configuration for your favourite IDE\u003c/li\u003e\n\u003cli\u003eensure your cloned project, particularly the class \u003ccode\u003eConfigureYourLambdaBuildOfJdk\u003c/code\u003e compiles and runs correctly\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003enavigate to the first exercise, \u003ccode\u003eExercise_1_Test\u003c/code\u003e (tests are in \u003ccode\u003esrc/test/java\u003c/code\u003e, in the package \u003ccode\u003eorg.adoptopenjdk.lambda.tutorial\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003eread background information in the JavaDoc, and follow instructions, making the test pass\u003c/li\u003e\n\u003cli\u003eto find solutions check out different branches of the project. Two flavours of solutions are available: what it might have looked like before JDK 8, and what it might look like after JDK 8. Those are in branches \u003ccode\u003esolutions-prejava8\u003c/code\u003e and \u003ccode\u003esolutions-postjava8\u003c/code\u003e respectively.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eExercises\u003c/h3\u003e\u003ca id=\"user-content-exercises\" class=\"anchor\" aria-label=\"Permalink: Exercises\" href=\"#exercises\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003eInternal vs External Iteration (the forEach method)\u003c/li\u003e\n\u003cli\u003eFiltering and Collecting\u003c/li\u003e\n\u003cli\u003eMapping\u003c/li\u003e\n\u003cli\u003eMethod References\u003c/li\u003e\n\u003cli\u003eDefault methods on interfaces\u003c/li\u003e\n\u003c/ol\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":2,"text":"Lambda Tutorial ","anchor":"lambda-tutorial-","htmlText":"Lambda Tutorial "},{"level":3,"text":"Exercises","anchor":"exercises","htmlText":"Exercises"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FAdoptOpenJDK%2Flambda-tutorial"}},{"displayName":"LICENSE.txt","repoName":"lambda-tutorial","refName":"master","path":"LICENSE.txt","preferredFileType":"license","tabName":"GPL-2.0","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FAdoptOpenJDK%2Flambda-tutorial"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-2e45fb5767a8.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1986eff8a159.js","githubDevUrl":null,"enabled_features":{"copilot_workspace":null,"code_nav_ui_events":false,"overview_shared_code_dropdown_button":false,"react_blob_overlay":false,"copilot_conversational_ux_embedding_update":false,"copilot_smell_icebreaker_ux":true,"accessible_code_button":true}}}}

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Tutorial Build Status

A set of exercises to teach use of Java 8 lambda syntax, and the Streams API.

To follow the exercises:

  • fork and clone the repository
  • ensure you have a correctly configured, JDK8+ build
    • Maven can help generate configuration for your favourite IDE
    • ensure your cloned project, particularly the class ConfigureYourLambdaBuildOfJdk compiles and runs correctly
  • navigate to the first exercise, Exercise_1_Test (tests are in src/test/java, in the package org.adoptopenjdk.lambda.tutorial)
  • read background information in the JavaDoc, and follow instructions, making the test pass
  • to find solutions check out different branches of the project. Two flavours of solutions are available: what it might have looked like before JDK 8, and what it might look like after JDK 8. Those are in branches solutions-prejava8 and solutions-postjava8 respectively.

Exercises

  1. Internal vs External Iteration (the forEach method)
  2. Filtering and Collecting
  3. Mapping
  4. Method References
  5. Default methods on interfaces

About

Exercises to learn lambda syntax + the Streams API from the upcoming JDK 8 release

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages

0