Suche senden
Hochladen
Lambdas And Streams Hands On Lab, JavaOne 2014
•
Als PPTX, PDF herunterladen
•
5 gefällt mir
•
1,511 views
Simon Ritter
Folgen
Software
Melden
Teilen
Melden
Teilen
1 von 17
Jetzt herunterladen
Empfohlen
Lambdas And Streams Hands On Lab
Lambdas And Streams Hands On Lab
Simon Ritter
Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3
Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
JAXLondon2014
JDK8 Lambdas and Streams: Changing The Way You Think When Developing Java
JDK8 Lambdas and Streams: Changing The Way You Think When Developing Java
Simon Ritter
Lambdas : Beyond The Basics
Lambdas : Beyond The Basics
Simon Ritter
Lambdas Hands On Lab
Lambdas Hands On Lab
Simon Ritter
Java SE 8
Java SE 8
Simon Ritter
Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8
Simon Ritter
Empfohlen
Lambdas And Streams Hands On Lab
Lambdas And Streams Hands On Lab
Simon Ritter
Lambdas and-streams-s ritter-v3
Lambdas and-streams-s ritter-v3
Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
Lambdas and Streams in Java SE 8: Making Bulk Operations simple - Simon Ritter
JAXLondon2014
JDK8 Lambdas and Streams: Changing The Way You Think When Developing Java
JDK8 Lambdas and Streams: Changing The Way You Think When Developing Java
Simon Ritter
Lambdas : Beyond The Basics
Lambdas : Beyond The Basics
Simon Ritter
Lambdas Hands On Lab
Lambdas Hands On Lab
Simon Ritter
Java SE 8
Java SE 8
Simon Ritter
Lessons Learnt With Lambdas and Streams in JDK 8
Lessons Learnt With Lambdas and Streams in JDK 8
Simon Ritter
Apouc 2014-java-8-create-the-future
Apouc 2014-java-8-create-the-future
OUGTH Oracle User Group in Thailand
Functional Programming With Lambdas and Streams in JDK8
Functional Programming With Lambdas and Streams in JDK8
IndicThreads
Introduction to new features in java 8
Introduction to new features in java 8
New York City College of Technology Computer Systems Technology Colloquium
Java SE 8 - New Features
Java SE 8 - New Features
Naveen Hegde
Lambdas & Streams
Lambdas & Streams
C4Media
Streams in Java 8
Streams in Java 8
Tobias Coetzee
Java 8
Java 8
Sudipta K Paik
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
jaxLondonConference
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
Jérôme Rocheteau
Java 8 streams
Java 8 streams
Manav Prasad
Java 8 lambda
Java 8 lambda
Manav Prasad
Chap2java5th
Chap2java5th
Asfand Hassan
3. Data types and Variables
3. Data types and Variables
Nilesh Dalvi
Chap1java5th
Chap1java5th
Asfand Hassan
Best practices in Java
Best practices in Java
Mudit Gupta
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
Simon Ritter
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
Simon Ritter
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
Simon Ritter
Java: Create The Future Keynote
Java: Create The Future Keynote
Simon Ritter
Functional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritter
Simon Ritter
Project Jigsaw in JDK9
Project Jigsaw in JDK9
Simon Ritter
The Java Carputer
The Java Carputer
Simon Ritter
Weitere ähnliche Inhalte
Was ist angesagt?
Apouc 2014-java-8-create-the-future
Apouc 2014-java-8-create-the-future
OUGTH Oracle User Group in Thailand
Functional Programming With Lambdas and Streams in JDK8
Functional Programming With Lambdas and Streams in JDK8
IndicThreads
Introduction to new features in java 8
Introduction to new features in java 8
New York City College of Technology Computer Systems Technology Colloquium
Java SE 8 - New Features
Java SE 8 - New Features
Naveen Hegde
Lambdas & Streams
Lambdas & Streams
C4Media
Streams in Java 8
Streams in Java 8
Tobias Coetzee
Java 8
Java 8
Sudipta K Paik
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
jaxLondonConference
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
Jérôme Rocheteau
Java 8 streams
Java 8 streams
Manav Prasad
Java 8 lambda
Java 8 lambda
Manav Prasad
Chap2java5th
Chap2java5th
Asfand Hassan
3. Data types and Variables
3. Data types and Variables
Nilesh Dalvi
Chap1java5th
Chap1java5th
Asfand Hassan
Best practices in Java
Best practices in Java
Mudit Gupta
Was ist angesagt?
(15)
Apouc 2014-java-8-create-the-future
Apouc 2014-java-8-create-the-future
Functional Programming With Lambdas and Streams in JDK8
Functional Programming With Lambdas and Streams in JDK8
Introduction to new features in java 8
Introduction to new features in java 8
Java SE 8 - New Features
Java SE 8 - New Features
Lambdas & Streams
Lambdas & Streams
Streams in Java 8
Streams in Java 8
Java 8
Java 8
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
Project Lambda: Functional Programming Constructs in Java - Simon Ritter (Ora...
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
How Green are Java Best Coding Practices? - GreenDays @ Rennes - 2014-07-01
Java 8 streams
Java 8 streams
Java 8 lambda
Java 8 lambda
Chap2java5th
Chap2java5th
3. Data types and Variables
3. Data types and Variables
Chap1java5th
Chap1java5th
Best practices in Java
Best practices in Java
Andere mochten auch
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
Simon Ritter
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
Simon Ritter
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
Simon Ritter
Java: Create The Future Keynote
Java: Create The Future Keynote
Simon Ritter
Functional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritter
Simon Ritter
Project Jigsaw in JDK9
Project Jigsaw in JDK9
Simon Ritter
The Java Carputer
The Java Carputer
Simon Ritter
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!
Simon Ritter
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Simon Ritter
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?
Simon Ritter
55 New Features in JDK 9
55 New Features in JDK 9
Simon Ritter
Andere mochten auch
(12)
Improved Developer Productivity In JDK8
Improved Developer Productivity In JDK8
Oracle Keynote from JMagghreb 2014
Oracle Keynote from JMagghreb 2014
Lambdas And Streams in JDK8
Lambdas And Streams in JDK8
Java: Create The Future Keynote
Java: Create The Future Keynote
Functional programming with_jdk8-s_ritter
Functional programming with_jdk8-s_ritter
Project Jigsaw in JDK9
Project Jigsaw in JDK9
The Java Carputer
The Java Carputer
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
It's Java Jim, But Not As We Know It!
It's Java Jim, But Not As We Know It!
JDK 9: Big Changes To Make Java Smaller
JDK 9: Big Changes To Make Java Smaller
Is An Agile Standard Possible For Java?
Is An Agile Standard Possible For Java?
55 New Features in JDK 9
55 New Features in JDK 9
Ähnlich wie Lambdas And Streams Hands On Lab, JavaOne 2014
JDK8 Streams
JDK8 Streams
Bansilal Haudakari
What's New in Java 8
What's New in Java 8
javafxpert
New features in jdk8 iti
New features in jdk8 iti
Ahmed mar3y
MapReduce Design Patterns
MapReduce Design Patterns
Donald Miner
New Features in JDK 8
New Features in JDK 8
Martin Toshev
Java 8 Intro - Core Features
Java 8 Intro - Core Features
GlobalLogic Ukraine
What's new in java 8
What's new in java 8
Dian Aditya
Java 8 New features
Java 8 New features
Son Nguyen
Java8
Java8
Felipe Mamud
Java 8: more readable and flexible code
Java 8: more readable and flexible code
WeAreEsynergy
Integrate SparkR with existing R packages to accelerate data science workflows
Integrate SparkR with existing R packages to accelerate data science workflows
Artem Ervits
Big Data Analytics-Open Source Toolkits
Big Data Analytics-Open Source Toolkits
DataWorks Summit
documents.pub_new-features-in-java-8-it-jpoialjavanaitedwien15java8pdf-java-8...
documents.pub_new-features-in-java-8-it-jpoialjavanaitedwien15java8pdf-java-8...
Akaks
A Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its API
Jörn Guy Süß JGS
Rdf Processing On The Java Platform
Rdf Processing On The Java Platform
guestc1b16406
Colloquium Report
Colloquium Report
Mohammad Faizan
Novidades do Java SE 8
Novidades do Java SE 8
Bruno Borges
Wien15 java8
Wien15 java8
Jaanus Pöial
Charles Sharp: Java 8 Streams
Charles Sharp: Java 8 Streams
jessitron
Java 8 Feature Preview
Java 8 Feature Preview
Jim Bethancourt
Ähnlich wie Lambdas And Streams Hands On Lab, JavaOne 2014
(20)
JDK8 Streams
JDK8 Streams
What's New in Java 8
What's New in Java 8
New features in jdk8 iti
New features in jdk8 iti
MapReduce Design Patterns
MapReduce Design Patterns
New Features in JDK 8
New Features in JDK 8
Java 8 Intro - Core Features
Java 8 Intro - Core Features
What's new in java 8
What's new in java 8
Java 8 New features
Java 8 New features
Java8
Java8
Java 8: more readable and flexible code
Java 8: more readable and flexible code
Integrate SparkR with existing R packages to accelerate data science workflows
Integrate SparkR with existing R packages to accelerate data science workflows
Big Data Analytics-Open Source Toolkits
Big Data Analytics-Open Source Toolkits
documents.pub_new-features-in-java-8-it-jpoialjavanaitedwien15java8pdf-java-8...
documents.pub_new-features-in-java-8-it-jpoialjavanaitedwien15java8pdf-java-8...
A Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its API
Rdf Processing On The Java Platform
Rdf Processing On The Java Platform
Colloquium Report
Colloquium Report
Novidades do Java SE 8
Novidades do Java SE 8
Wien15 java8
Wien15 java8
Charles Sharp: Java 8 Streams
Charles Sharp: Java 8 Streams
Java 8 Feature Preview
Java 8 Feature Preview
Mehr von Simon Ritter
Cloud Native Compiler
Cloud Native Compiler
Simon Ritter
Java On CRaC
Java On CRaC
Simon Ritter
The Art of Java Type Patterns
The Art of Java Type Patterns
Simon Ritter
Modern Java Workshop
Modern Java Workshop
Simon Ritter
Java performance monitoring
Java performance monitoring
Simon Ritter
Modern Java Workshop
Modern Java Workshop
Simon Ritter
Getting the Most From Modern Java
Getting the Most From Modern Java
Simon Ritter
Building a Better JVM
Building a Better JVM
Simon Ritter
JDK 14 Lots of New Features
JDK 14 Lots of New Features
Simon Ritter
Java after 8
Java after 8
Simon Ritter
How to Choose a JDK
How to Choose a JDK
Simon Ritter
Java Programming
Java Programming
Simon Ritter
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
Simon Ritter
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java Technology
Simon Ritter
Is Java Still Free?
Is Java Still Free?
Simon Ritter
Moving Towards JDK 12
Moving Towards JDK 12
Simon Ritter
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
Simon Ritter
Java Is Still Free
Java Is Still Free
Simon Ritter
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
Simon Ritter
JDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep Dive
Simon Ritter
Mehr von Simon Ritter
(20)
Cloud Native Compiler
Cloud Native Compiler
Java On CRaC
Java On CRaC
The Art of Java Type Patterns
The Art of Java Type Patterns
Modern Java Workshop
Modern Java Workshop
Java performance monitoring
Java performance monitoring
Modern Java Workshop
Modern Java Workshop
Getting the Most From Modern Java
Getting the Most From Modern Java
Building a Better JVM
Building a Better JVM
JDK 14 Lots of New Features
JDK 14 Lots of New Features
Java after 8
Java after 8
How to Choose a JDK
How to Choose a JDK
Java Programming
Java Programming
The Latest in Enterprise JavaBeans Technology
The Latest in Enterprise JavaBeans Technology
Developing Enterprise Applications Using Java Technology
Developing Enterprise Applications Using Java Technology
Is Java Still Free?
Is Java Still Free?
Moving Towards JDK 12
Moving Towards JDK 12
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
Java Is Still Free
Java Is Still Free
JDK 9, 10, 11 and Beyond
JDK 9, 10, 11 and Beyond
JDK 9 and JDK 10 Deep Dive
JDK 9 and JDK 10 Deep Dive
Kürzlich hochgeladen
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
harshavardhanraghave
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
OnePlan Solutions
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
gurkirankumar98700
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
Jhone kinadey
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Alberto González Trastoy
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Arshad QA
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
SolGuruz
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
Wave PLM
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ABDERRAOUF MEHENNI
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Dynamic Netsoft
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
kalichargn70th171
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
panagenda
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
Clustering techniques data mining book ....
Clustering techniques data mining book ....
ShaimaaMohamedGalal
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
joe51371421
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
kellynguyen01
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
MyIntelliSource, Inc.
Kürzlich hochgeladen
(20)
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
DNT_Corporate presentation know about us
DNT_Corporate presentation know about us
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Clustering techniques data mining book ....
Clustering techniques data mining book ....
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Lambdas And Streams Hands On Lab, JavaOne 2014
1.
2.
Lambdas & Streams
Laboratory Stuart Marks Simon Ritter Angela Caicedo Oracle Corp. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
3.
Lambdas and Functions
Copyright © 2012, Oracle and/or its affiliates. 3 All rights reserved. Library Review
4.
Lambda Expressions
Lambda expression is an anonymous function Think of it like a method – But not associated with a class Can be used wherever you would use an anonymous inner class – Single abstract method type Syntax – ([optional-parameters]) -> body Types can be inferred (parameters and return type) Copyright © 2012, Oracle and/or its affiliates. 4 All rights reserved.
5.
Lambda Examples SomeList<Student>
students = ... double highestScore = students.stream(). filter(Student s -> s.getGradYear() == 2011). map(Student s -> s.getScore()). max(); Copyright © 2012, Oracle and/or its affiliates. 5 All rights reserved.
6.
Method References •
Method references let us reuse a method as a lambda expression FileFilter x = new FileFilter() { public boolean accept(File f) { FileFilter x = (File f) -> f.canRead(); FileFilter x = File::canRead; Copyright © 2012, Oracle and/or its affiliates. 6 All rights reserved. return f.canRead(); } };
7.
The Stream Class
java.util.stream Stream<T> – A sequence of elements supporting sequential and parallel operations A Stream is opened by calling: – Collection.stream() – Collection.parallelStream() Many Stream methods return Stream objects – Very simple (and logical) method chaining Copyright © 2012, Oracle and/or its affiliates. 7 All rights reserved.
8.
Stream Basics
Using a Stream means having three things A source – Something that creates a Stream of objects Zero or more intermediate objects – Take a Stream as input, produce a Stream as output – Potentially modify the contents of the Stream (but don’t have to) A terminal operation – Takes a Stream as input – Consumes the Stream, or generates some other type of output Copyright © 2012, Oracle and/or its affiliates. 8 All rights reserved.
9.
Stream Usage
Multiple operations available – collect, filter, count, skip, limit, sorted – map (and map to types, e.g. mapToInt) – flatMap maps each element in a Stream to possibly multiple elements e.g. flatMap(line -> Stream.of(line.split(REGEXP)); List<String> names = Arrays.asList(“Bob”, “Alice”, “Charlie”); System.out.println(names. stream(). filter(e -> e.getLength() > 4). findFirst(). get()); Copyright © 2012, Oracle and/or its affiliates. 9 All rights reserved.
10.
java.util.function Package
Predicate<T> – Determine if the input of type T matches some criteria Consumer<T> – Accept a single input argumentof type T, and return no result Function<T, R> – Apply a function to the input type T, generating a result of type R Plus several more Copyright © 2012, Oracle and/or its affiliates. 10 All rights reserved.
11.
The iterable Interface
Used by most collections One method – forEach() – The parameter is a Consumer wordList.forEach(s -> System.out.println(s)); wordList.forEach(System.out::println); Copyright © 2012, Oracle and/or its affiliates. 11 All rights reserved.
12.
Files and Lines
of Text BufferedReader has new method – Stream<String> lines() HINT: Test framework creates a BufferedReader for you Copyright © 2012, Oracle and/or its affiliates. 12 All rights reserved.
13.
Maps and FlatMaps
Map Values in a Stream Map FlatMap Input Stream Input Stream Copyright © 2012, Oracle and/or its affiliates. 13 All rights reserved. 1 to 1 mapping 1 to many mapping Output Stream Output Stream
14.
Useful Stream Methods
collect (terminal) filter (intermediate) count (terminal) skip, limit (intermediate) max (terminal) getAsInt (terminal) Copyright © 2012, Oracle and/or its affiliates. 14 All rights reserved.
15.
Getting Started
Open the LambdasHOL project in NetBeans The exercises are configured as tests Edit the tests – Remove the @Ignore annotation Run the tests (Ctrl F6, or from the menu) Make the tests pass Simple! Copyright © 2012, Oracle and/or its affiliates. 15 All rights reserved.
16.
Copyright © 2012,
Oracle and/or its affiliates. 16 All rights reserved. Let’s Go!
17.
Copyright © 2012,
Oracle and/or its affiliates. 17 All rights reserved.
Jetzt herunterladen