SlideShare a Scribd company logo
1 of 111
Download to read offline
…
source : http://www.oracle.com/technetwork/java/eol-135779.html
source : http://blog.soat.fr/?p=29705
List<String> datas = Arrays.asList("one", "two", "three");
datas.forEach(new Consumer<String>() {
@Override
public void accept(String elt) {
System.out.println(elt);
}
});
List<String> datas = Arrays.asList("one", "two", "three");
datas.forEach(new Consumer<String>() {
@Override
public void accept(String elt) {
System.out.println(elt);
}
});
List<String> datas = Arrays.asList("one", "two", "three");
datas.forEach(new Consumer<String>() {
@Override
public void accept(String elt) {
System.out.println(elt);
}
});
List<String> datas = Arrays.asList("one", "two", "three");
datas.forEach(elt -> System.out.println(elt));
Resource resource = null;
try {
resource = new Resource();
resource.doJob();
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (resource != null) {
try {
resource.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
try(Resource resource = new Resource()) {
resource.doJob();
} catch (Exception ex) {
ex.printStackTrace();
}
try(Resource resource = new Resource()) {
resource.doJob();
} catch (Exception ex) {
ex.printStackTrace();
}
public static void doWithResource(Consumer<Resource> lambda)
{
Resource resource = null;
try {
resource = new Resource();
lambda.accept(resource);
} finally {
if(resource != null) {
try {
resource.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public static void doWithResource(Consumer<Resource> lambda)
{
Resource resource = null;
try {
resource = new Resource();
lambda.accept(resource);
} finally {
if(resource != null) {
try {
resource.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
public static void doWithResource(Consumer<Resource> lambda)
{
Resource resource = null;
try {
resource = new Resource();
lambda.accept(resource);
} finally {
if(resource != null) {
try {
resource.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
doWithResource(resource -> resource.doJob());
Map<String, String> map = new HashMap<>();
String key = "KEY";
if(!map.containsKey(key)) {
map.put(key, key.concat("_COMPUTED"));
}
String result = map.get(key);
Map<String, String> map = new HashMap<>();
String key = "KEY";
if(!map.containsKey(key)) {
map.put(key, key.concat("_COMPUTED"));
}
String result = map.get(key);
Map<String, String> map = new HashMap<>();
String key = "KEY";
String result = map.computeIfAbsent(key,
k -> key + "_COMPUTED");
Map<String, String> map = new HashMap<>();
String key = "KEY";
String result = map.computeIfAbsent(key,
k -> key + "_COMPUTED");
List<String> red = colors.stream()
.filter(c -> "RED".equals(c))
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = new ArrayList<>();
for (Group group : registry.getGroups()) {
for (User user : group.getUsers()) {
if(user.getAge() >= 18) {
users.add(user);
}
}
}
Registry registry = new Registry();
List<User> users = new ArrayList<>();
for (Group group : registry.getGroups()) {
for (User user : group.getUsers()) {
if(user.getAge() >= 18) {
users.add(user);
}
}
}
Registry registry = new Registry();
List<User> users = new ArrayList<>();
for (Group group : registry.getGroups()) {
for (User user : group.getUsers()) {
if(user.getAge() >= 18) {
users.add(user);
}
}
}
Registry registry = new Registry();
List<User> users = new ArrayList<>();
for (Group group : registry.getGroups()) {
for (User user : group.getUsers()) {
if(user.getAge() >= 18) {
users.add(user);
}
}
}
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
public List<User> filterUsers(Registry registry,
Predicate<User> filter) {
return registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(filter)
.collect(Collectors.toList());
}
public List<User> filterUsers(Registry registry,
Predicate<User> filter) {
return registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(filter)
.collect(Collectors.toList());
}
public List<User> filterUsers(Registry registry,
Predicate<User> filter) {
return registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(filter)
.collect(Collectors.toList());
}
public List<User> filterUsers(Registry registry,
Predicate<User> filter) {
return registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(filter)
.collect(Collectors.toList());
}
Registry registry = new Registry();
filterUsers(registry, u -> u.getAge() >= 18);
filterUsers(registry, u -> u.getName().startsWith("John"));
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> {
return grp.getUsers()
.stream()
.filter(u -> {
return u.getAge() >= 18;
});
})
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.stream()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
Registry registry = new Registry();
List<User> users = registry.getGroups()
.parallel()
.flatMap(grp -> grp.getUsers().stream())
.filter(u -> u.getAge() >= 18)
.collect(Collectors.toList());
User remoteUser = null;
// NullPointerException
System.out.println("User name : " + remoteUser.getName());
Optional<User> user = Optional.ofNullable(remoteUser);
user.ifPresent(u -> System.out.println("User name : " + u.getName()));
Optional<User> user = Optional.ofNullable(remoteUser);
user.ifPresent(u -> System.out.println("User name : " + u.getName()));
Optional<User> user = Optional.ofNullable(remoteUser);
user.ifPresent(u -> System.out.println("User name : " + u.getName()));
user.flatMap(u -> Optional.ofNullable(u.getName()))
.ifPresent(name -> System.out.println("User name :" + name));
user.flatMap(u -> Optional.ofNullable(u.getName()))
.ifPresent(name -> System.out.println("User name :" + name));
user.flatMap(u -> Optional.ofNullable(u.getName()))
.ifPresent(name -> System.out.println("User name :" + name));
if(user != null) {
if(user.getName() != null) {
System.out.println("User name :" + user.getName());
}
}
Optional<String> birthdate = remoteUser.getBirthdate();
LocalDate newDate = LocalDate.now().plusDays(3)
.plusMonths(2);
LocalDateTime newDateTime = LocalDateTime.now()
.plusMinutes(3)
.plusSeconds(6)
.plusDays(2);
LocalDate newDate = LocalDate.now().plusDays(3)
.plusMonths(2);
LocalDateTime newDateTime = LocalDateTime.now()
.plusMinutes(3)
.plusSeconds(6)
.plusDays(2);
LocalDate newDate = LocalDate.now().plusDays(3)
.plusMonths(2);
LocalDateTime newDateTime = LocalDateTime.now()
.plusMinutes(3)
.plusSeconds(6)
.plusDays(2);
Source : http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html
new BigDecimal("0.00").stripTrailingZeros().equals(BigDecimal.ZERO))
new BigDecimal("0.00").stripTrailingZeros().equals(BigDecimal.ZERO))
new BigDecimal("0.00").stripTrailingZeros().equals(BigDecimal.ZERO))
…
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise
JAVA 8 : Migration et enjeux stratégiques en entreprise

More Related Content

What's hot

6. Generics. Collections. Streams
6. Generics. Collections. Streams6. Generics. Collections. Streams
6. Generics. Collections. StreamsDEVTYPE
 
Implementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickImplementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickHermann Hueck
 
Martin Fowler's Refactoring Techniques Quick Reference
Martin Fowler's Refactoring Techniques Quick ReferenceMartin Fowler's Refactoring Techniques Quick Reference
Martin Fowler's Refactoring Techniques Quick ReferenceSeung-Bum Lee
 
[2019-07] GraphQL in depth (serverside)
[2019-07] GraphQL in depth (serverside)[2019-07] GraphQL in depth (serverside)
[2019-07] GraphQL in depth (serverside)croquiscom
 
Modern technologies in data science
Modern technologies in data science Modern technologies in data science
Modern technologies in data science Chucheng Hsieh
 
JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?PROIDEA
 
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...tdc-globalcode
 
Java 8 - An Introduction by Jason Swartz
Java 8 - An Introduction by Jason SwartzJava 8 - An Introduction by Jason Swartz
Java 8 - An Introduction by Jason SwartzJason Swartz
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Leonardo Borges
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системеDEVTYPE
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBtdc-globalcode
 
From java to kotlin beyond alt+shift+cmd+k
From java to kotlin beyond alt+shift+cmd+kFrom java to kotlin beyond alt+shift+cmd+k
From java to kotlin beyond alt+shift+cmd+kFabio Collini
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fpAlexander Granin
 

What's hot (20)

6. Generics. Collections. Streams
6. Generics. Collections. Streams6. Generics. Collections. Streams
6. Generics. Collections. Streams
 
Implementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with SlickImplementing a many-to-many Relationship with Slick
Implementing a many-to-many Relationship with Slick
 
Martin Fowler's Refactoring Techniques Quick Reference
Martin Fowler's Refactoring Techniques Quick ReferenceMartin Fowler's Refactoring Techniques Quick Reference
Martin Fowler's Refactoring Techniques Quick Reference
 
[2019-07] GraphQL in depth (serverside)
[2019-07] GraphQL in depth (serverside)[2019-07] GraphQL in depth (serverside)
[2019-07] GraphQL in depth (serverside)
 
Modern technologies in data science
Modern technologies in data science Modern technologies in data science
Modern technologies in data science
 
ES6 in Real Life
ES6 in Real LifeES6 in Real Life
ES6 in Real Life
 
JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?JDD 2016 - Pawel Byszewski - Kotlin, why?
JDD 2016 - Pawel Byszewski - Kotlin, why?
 
Javascript
JavascriptJavascript
Javascript
 
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...
TDC2016POA | Trilha .NET - C# como você nunca viu: conceitos avançados de pro...
 
Java 8 - An Introduction by Jason Swartz
Java 8 - An Introduction by Jason SwartzJava 8 - An Introduction by Jason Swartz
Java 8 - An Introduction by Jason Swartz
 
Sneaking inside Kotlin features
Sneaking inside Kotlin featuresSneaking inside Kotlin features
Sneaking inside Kotlin features
 
What are arrays in java script
What are arrays in java scriptWhat are arrays in java script
What are arrays in java script
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
Google's Guava
Google's GuavaGoogle's Guava
Google's Guava
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
 
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDBTDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
TDC2016POA | Trilha .NET - CQRS e ES na prática com RavenDB
 
From java to kotlin beyond alt+shift+cmd+k
From java to kotlin beyond alt+shift+cmd+kFrom java to kotlin beyond alt+shift+cmd+k
From java to kotlin beyond alt+shift+cmd+k
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Kotlin, why?
Kotlin, why?Kotlin, why?
Kotlin, why?
 

Viewers also liked

L'entreprise libérée
L'entreprise libéréeL'entreprise libérée
L'entreprise libéréeSOAT
 
Amélioration continue, c'est l'affaire de tous !
Amélioration continue, c'est l'affaire de tous !Amélioration continue, c'est l'affaire de tous !
Amélioration continue, c'est l'affaire de tous !SOAT
 
A la découverte du Responsive Web Design par Mathieu Parisot - Soat
A la découverte du Responsive Web Design par Mathieu Parisot - SoatA la découverte du Responsive Web Design par Mathieu Parisot - Soat
A la découverte du Responsive Web Design par Mathieu Parisot - SoatSOAT
 
Angular JS - Paterne Gaye-Guingnido
Angular JS - Paterne Gaye-Guingnido Angular JS - Paterne Gaye-Guingnido
Angular JS - Paterne Gaye-Guingnido SOAT
 
Soirée 3T Soat - Asp.net MVC
Soirée 3T Soat - Asp.net MVCSoirée 3T Soat - Asp.net MVC
Soirée 3T Soat - Asp.net MVCSOAT
 
MongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesMongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesSOAT
 

Viewers also liked (6)

L'entreprise libérée
L'entreprise libéréeL'entreprise libérée
L'entreprise libérée
 
Amélioration continue, c'est l'affaire de tous !
Amélioration continue, c'est l'affaire de tous !Amélioration continue, c'est l'affaire de tous !
Amélioration continue, c'est l'affaire de tous !
 
A la découverte du Responsive Web Design par Mathieu Parisot - Soat
A la découverte du Responsive Web Design par Mathieu Parisot - SoatA la découverte du Responsive Web Design par Mathieu Parisot - Soat
A la découverte du Responsive Web Design par Mathieu Parisot - Soat
 
Angular JS - Paterne Gaye-Guingnido
Angular JS - Paterne Gaye-Guingnido Angular JS - Paterne Gaye-Guingnido
Angular JS - Paterne Gaye-Guingnido
 
Soirée 3T Soat - Asp.net MVC
Soirée 3T Soat - Asp.net MVCSoirée 3T Soat - Asp.net MVC
Soirée 3T Soat - Asp.net MVC
 
MongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de donnéesMongoDB : la base NoSQL qui réinvente la gestion de données
MongoDB : la base NoSQL qui réinvente la gestion de données
 

Similar to JAVA 8 : Migration et enjeux stratégiques en entreprise

Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8bryanbibat
 
TDC2016SP - Código funcional em Java: superando o hype
TDC2016SP - Código funcional em Java: superando o hypeTDC2016SP - Código funcional em Java: superando o hype
TDC2016SP - Código funcional em Java: superando o hypetdc-globalcode
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupHenri Tremblay
 
Evolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveEvolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveNaresha K
 
18. Java associative arrays
18. Java associative arrays18. Java associative arrays
18. Java associative arraysIntro C# Book
 
Java Generics for Dummies
Java Generics for DummiesJava Generics for Dummies
Java Generics for Dummiesknutmork
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-CollectionsMohammad Shaker
 
Write a program that reads a graph from a file and determines whether.docx
 Write a program that reads a graph from a file and determines whether.docx Write a program that reads a graph from a file and determines whether.docx
Write a program that reads a graph from a file and determines whether.docxajoy21
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of LithiumNate Abele
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfaromanets
 
関数潮流(Function Tendency)
関数潮流(Function Tendency)関数潮流(Function Tendency)
関数潮流(Function Tendency)riue
 
Java in the Past, Java in the Future
Java in the Past, Java in the FutureJava in the Past, Java in the Future
Java in the Past, Java in the FutureYuichi Sakuraba
 

Similar to JAVA 8 : Migration et enjeux stratégiques en entreprise (20)

An Introduction to RxJava
An Introduction to RxJavaAn Introduction to RxJava
An Introduction to RxJava
 
Fp java8
Fp java8Fp java8
Fp java8
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
 
Lekcja stylu
Lekcja styluLekcja stylu
Lekcja stylu
 
TDC2016SP - Código funcional em Java: superando o hype
TDC2016SP - Código funcional em Java: superando o hypeTDC2016SP - Código funcional em Java: superando o hype
TDC2016SP - Código funcional em Java: superando o hype
 
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup GroupJava 8, lambdas, generics: How to survive? - NYC Java Meetup Group
Java 8, lambdas, generics: How to survive? - NYC Java Meetup Group
 
Evolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and EffectiveEvolving with Java - How to remain Relevant and Effective
Evolving with Java - How to remain Relevant and Effective
 
18. Java associative arrays
18. Java associative arrays18. Java associative arrays
18. Java associative arrays
 
Java Generics for Dummies
Java Generics for DummiesJava Generics for Dummies
Java Generics for Dummies
 
C# Starter L04-Collections
C# Starter L04-CollectionsC# Starter L04-Collections
C# Starter L04-Collections
 
Java 8 Examples
Java 8 ExamplesJava 8 Examples
Java 8 Examples
 
What is new in Java 8
What is new in Java 8What is new in Java 8
What is new in Java 8
 
Write a program that reads a graph from a file and determines whether.docx
 Write a program that reads a graph from a file and determines whether.docx Write a program that reads a graph from a file and determines whether.docx
Write a program that reads a graph from a file and determines whether.docx
 
Alternate JVM Languages
Alternate JVM LanguagesAlternate JVM Languages
Alternate JVM Languages
 
Java Generics
Java GenericsJava Generics
Java Generics
 
The State of Lithium
The State of LithiumThe State of Lithium
The State of Lithium
 
CAVE Overview
CAVE OverviewCAVE Overview
CAVE Overview
 
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdfCreat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
Creat Shape classes from scratch DETAILS You will create 3 shape cla.pdf
 
関数潮流(Function Tendency)
関数潮流(Function Tendency)関数潮流(Function Tendency)
関数潮流(Function Tendency)
 
Java in the Past, Java in the Future
Java in the Past, Java in the FutureJava in the Past, Java in the Future
Java in the Past, Java in the Future
 

More from SOAT

Back from Microsoft //Build 2018
Back from Microsoft //Build 2018Back from Microsoft //Build 2018
Back from Microsoft //Build 2018SOAT
 
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESSOAT
 
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-DurandSOAT
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-DurandSOAT
 
2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-Durand2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-DurandSOAT
 
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu Parisot
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu ParisotDans l'enfer du Web Mobile - un retour d'expérience - Mathieu Parisot
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu ParisotSOAT
 
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014RxJava, Getting Started - David Wursteisen - 16 Octobre 2014
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014SOAT
 
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...SOAT
 
Nio sur Netty par Mouhcine Moulou - 3 avril 2014
Nio sur Netty par Mouhcine Moulou - 3 avril 2014Nio sur Netty par Mouhcine Moulou - 3 avril 2014
Nio sur Netty par Mouhcine Moulou - 3 avril 2014SOAT
 
20140123 java8 lambdas_jose-paumard-soat
20140123 java8 lambdas_jose-paumard-soat20140123 java8 lambdas_jose-paumard-soat
20140123 java8 lambdas_jose-paumard-soatSOAT
 
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...SOAT
 
Amazon Web Service par Bertrand Lehurt - 11 mars 2014
Amazon Web Service par Bertrand Lehurt - 11 mars 2014Amazon Web Service par Bertrand Lehurt - 11 mars 2014
Amazon Web Service par Bertrand Lehurt - 11 mars 2014SOAT
 
ASP.Net Web API - Léonard Labat (18 février 2014)
ASP.Net Web API - Léonard Labat (18 février 2014)ASP.Net Web API - Léonard Labat (18 février 2014)
ASP.Net Web API - Léonard Labat (18 février 2014)SOAT
 
Xamarin et le développement natif d’applications Android, iOS et Windows en C#
 Xamarin et le développement natif d’applications Android, iOS et Windows en C# Xamarin et le développement natif d’applications Android, iOS et Windows en C#
Xamarin et le développement natif d’applications Android, iOS et Windows en C#SOAT
 
Présentation spring data Matthieu Briend
Présentation spring data  Matthieu BriendPrésentation spring data  Matthieu Briend
Présentation spring data Matthieu BriendSOAT
 
Je suis agile tout seul - Ricardo Minhoto
Je suis agile tout seul - Ricardo MinhotoJe suis agile tout seul - Ricardo Minhoto
Je suis agile tout seul - Ricardo MinhotoSOAT
 
Facilitez vous la vie - Ricardo Minhoto
Facilitez vous la vie - Ricardo MinhotoFacilitez vous la vie - Ricardo Minhoto
Facilitez vous la vie - Ricardo MinhotoSOAT
 
Play : Premiers pas par l'exemple le 120613
Play : Premiers pas par l'exemple le 120613Play : Premiers pas par l'exemple le 120613
Play : Premiers pas par l'exemple le 120613SOAT
 
Transition Agile technique à grande échelle
Transition Agile technique à grande échelleTransition Agile technique à grande échelle
Transition Agile technique à grande échelleSOAT
 
Transition agile organisationnelle à grande échelle
Transition agile organisationnelle à grande échelleTransition agile organisationnelle à grande échelle
Transition agile organisationnelle à grande échelleSOAT
 

More from SOAT (20)

Back from Microsoft //Build 2018
Back from Microsoft //Build 2018Back from Microsoft //Build 2018
Back from Microsoft //Build 2018
 
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUESARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
 
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
3/3 : The path to CDI 2.0 - Antoine Sabot-Durand
 
1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand1/3 : introduction to CDI - Antoine Sabot-Durand
1/3 : introduction to CDI - Antoine Sabot-Durand
 
2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-Durand2/3 : CDI advanced - Antoine Sabot-Durand
2/3 : CDI advanced - Antoine Sabot-Durand
 
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu Parisot
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu ParisotDans l'enfer du Web Mobile - un retour d'expérience - Mathieu Parisot
Dans l'enfer du Web Mobile - un retour d'expérience - Mathieu Parisot
 
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014RxJava, Getting Started - David Wursteisen - 16 Octobre 2014
RxJava, Getting Started - David Wursteisen - 16 Octobre 2014
 
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...
L'impact du Responsive Web Design sur vos équipes projet - Mathieu Parisot - ...
 
Nio sur Netty par Mouhcine Moulou - 3 avril 2014
Nio sur Netty par Mouhcine Moulou - 3 avril 2014Nio sur Netty par Mouhcine Moulou - 3 avril 2014
Nio sur Netty par Mouhcine Moulou - 3 avril 2014
 
20140123 java8 lambdas_jose-paumard-soat
20140123 java8 lambdas_jose-paumard-soat20140123 java8 lambdas_jose-paumard-soat
20140123 java8 lambdas_jose-paumard-soat
 
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...
Développer des applications iOS et Android avec c# grâce à Xamarin par Cyril ...
 
Amazon Web Service par Bertrand Lehurt - 11 mars 2014
Amazon Web Service par Bertrand Lehurt - 11 mars 2014Amazon Web Service par Bertrand Lehurt - 11 mars 2014
Amazon Web Service par Bertrand Lehurt - 11 mars 2014
 
ASP.Net Web API - Léonard Labat (18 février 2014)
ASP.Net Web API - Léonard Labat (18 février 2014)ASP.Net Web API - Léonard Labat (18 février 2014)
ASP.Net Web API - Léonard Labat (18 février 2014)
 
Xamarin et le développement natif d’applications Android, iOS et Windows en C#
 Xamarin et le développement natif d’applications Android, iOS et Windows en C# Xamarin et le développement natif d’applications Android, iOS et Windows en C#
Xamarin et le développement natif d’applications Android, iOS et Windows en C#
 
Présentation spring data Matthieu Briend
Présentation spring data  Matthieu BriendPrésentation spring data  Matthieu Briend
Présentation spring data Matthieu Briend
 
Je suis agile tout seul - Ricardo Minhoto
Je suis agile tout seul - Ricardo MinhotoJe suis agile tout seul - Ricardo Minhoto
Je suis agile tout seul - Ricardo Minhoto
 
Facilitez vous la vie - Ricardo Minhoto
Facilitez vous la vie - Ricardo MinhotoFacilitez vous la vie - Ricardo Minhoto
Facilitez vous la vie - Ricardo Minhoto
 
Play : Premiers pas par l'exemple le 120613
Play : Premiers pas par l'exemple le 120613Play : Premiers pas par l'exemple le 120613
Play : Premiers pas par l'exemple le 120613
 
Transition Agile technique à grande échelle
Transition Agile technique à grande échelleTransition Agile technique à grande échelle
Transition Agile technique à grande échelle
 
Transition agile organisationnelle à grande échelle
Transition agile organisationnelle à grande échelleTransition agile organisationnelle à grande échelle
Transition agile organisationnelle à grande échelle
 

Recently uploaded

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

JAVA 8 : Migration et enjeux stratégiques en entreprise

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. List<String> datas = Arrays.asList("one", "two", "three"); datas.forEach(new Consumer<String>() { @Override public void accept(String elt) { System.out.println(elt); } });
  • 25. List<String> datas = Arrays.asList("one", "two", "three"); datas.forEach(new Consumer<String>() { @Override public void accept(String elt) { System.out.println(elt); } });
  • 26. List<String> datas = Arrays.asList("one", "two", "three"); datas.forEach(new Consumer<String>() { @Override public void accept(String elt) { System.out.println(elt); } });
  • 27. List<String> datas = Arrays.asList("one", "two", "three"); datas.forEach(elt -> System.out.println(elt));
  • 28.
  • 29.
  • 30. Resource resource = null; try { resource = new Resource(); resource.doJob(); } catch (Exception ex) { ex.printStackTrace(); } finally { if (resource != null) { try { resource.close(); } catch (Exception e) { e.printStackTrace(); } } }
  • 31. try(Resource resource = new Resource()) { resource.doJob(); } catch (Exception ex) { ex.printStackTrace(); }
  • 32. try(Resource resource = new Resource()) { resource.doJob(); } catch (Exception ex) { ex.printStackTrace(); }
  • 33. public static void doWithResource(Consumer<Resource> lambda) { Resource resource = null; try { resource = new Resource(); lambda.accept(resource); } finally { if(resource != null) { try { resource.close(); } catch (Exception e) { e.printStackTrace(); } } } }
  • 34. public static void doWithResource(Consumer<Resource> lambda) { Resource resource = null; try { resource = new Resource(); lambda.accept(resource); } finally { if(resource != null) { try { resource.close(); } catch (Exception e) { e.printStackTrace(); } } } }
  • 35. public static void doWithResource(Consumer<Resource> lambda) { Resource resource = null; try { resource = new Resource(); lambda.accept(resource); } finally { if(resource != null) { try { resource.close(); } catch (Exception e) { e.printStackTrace(); } } } }
  • 37.
  • 38. Map<String, String> map = new HashMap<>(); String key = "KEY"; if(!map.containsKey(key)) { map.put(key, key.concat("_COMPUTED")); } String result = map.get(key);
  • 39. Map<String, String> map = new HashMap<>(); String key = "KEY"; if(!map.containsKey(key)) { map.put(key, key.concat("_COMPUTED")); } String result = map.get(key);
  • 40. Map<String, String> map = new HashMap<>(); String key = "KEY"; String result = map.computeIfAbsent(key, k -> key + "_COMPUTED");
  • 41. Map<String, String> map = new HashMap<>(); String key = "KEY"; String result = map.computeIfAbsent(key, k -> key + "_COMPUTED");
  • 42.
  • 43. List<String> red = colors.stream() .filter(c -> "RED".equals(c)) .collect(Collectors.toList());
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. Registry registry = new Registry(); List<User> users = new ArrayList<>(); for (Group group : registry.getGroups()) { for (User user : group.getUsers()) { if(user.getAge() >= 18) { users.add(user); } } }
  • 49. Registry registry = new Registry(); List<User> users = new ArrayList<>(); for (Group group : registry.getGroups()) { for (User user : group.getUsers()) { if(user.getAge() >= 18) { users.add(user); } } }
  • 50. Registry registry = new Registry(); List<User> users = new ArrayList<>(); for (Group group : registry.getGroups()) { for (User user : group.getUsers()) { if(user.getAge() >= 18) { users.add(user); } } }
  • 51. Registry registry = new Registry(); List<User> users = new ArrayList<>(); for (Group group : registry.getGroups()) { for (User user : group.getUsers()) { if(user.getAge() >= 18) { users.add(user); } } }
  • 52. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 53. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 54. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 55. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 56. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 57.
  • 58. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 59. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 60. public List<User> filterUsers(Registry registry, Predicate<User> filter) { return registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(filter) .collect(Collectors.toList()); }
  • 61. public List<User> filterUsers(Registry registry, Predicate<User> filter) { return registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(filter) .collect(Collectors.toList()); }
  • 62. public List<User> filterUsers(Registry registry, Predicate<User> filter) { return registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(filter) .collect(Collectors.toList()); }
  • 63. public List<User> filterUsers(Registry registry, Predicate<User> filter) { return registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(filter) .collect(Collectors.toList()); }
  • 64. Registry registry = new Registry(); filterUsers(registry, u -> u.getAge() >= 18); filterUsers(registry, u -> u.getName().startsWith("John"));
  • 65. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 66. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> { return grp.getUsers() .stream() .filter(u -> { return u.getAge() >= 18; }); }) .collect(Collectors.toList());
  • 67.
  • 68. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 69. Registry registry = new Registry(); List<User> users = registry.getGroups() .stream() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 70. Registry registry = new Registry(); List<User> users = registry.getGroups() .parallel() .flatMap(grp -> grp.getUsers().stream()) .filter(u -> u.getAge() >= 18) .collect(Collectors.toList());
  • 71.
  • 72.
  • 73.
  • 74. User remoteUser = null; // NullPointerException System.out.println("User name : " + remoteUser.getName());
  • 75. Optional<User> user = Optional.ofNullable(remoteUser); user.ifPresent(u -> System.out.println("User name : " + u.getName()));
  • 76. Optional<User> user = Optional.ofNullable(remoteUser); user.ifPresent(u -> System.out.println("User name : " + u.getName()));
  • 77. Optional<User> user = Optional.ofNullable(remoteUser); user.ifPresent(u -> System.out.println("User name : " + u.getName()));
  • 78. user.flatMap(u -> Optional.ofNullable(u.getName())) .ifPresent(name -> System.out.println("User name :" + name));
  • 79. user.flatMap(u -> Optional.ofNullable(u.getName())) .ifPresent(name -> System.out.println("User name :" + name));
  • 80. user.flatMap(u -> Optional.ofNullable(u.getName())) .ifPresent(name -> System.out.println("User name :" + name));
  • 81. if(user != null) { if(user.getName() != null) { System.out.println("User name :" + user.getName()); } }
  • 82. Optional<String> birthdate = remoteUser.getBirthdate();
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89. LocalDate newDate = LocalDate.now().plusDays(3) .plusMonths(2); LocalDateTime newDateTime = LocalDateTime.now() .plusMinutes(3) .plusSeconds(6) .plusDays(2);
  • 90. LocalDate newDate = LocalDate.now().plusDays(3) .plusMonths(2); LocalDateTime newDateTime = LocalDateTime.now() .plusMinutes(3) .plusSeconds(6) .plusDays(2);
  • 91. LocalDate newDate = LocalDate.now().plusDays(3) .plusMonths(2); LocalDateTime newDateTime = LocalDateTime.now() .plusMinutes(3) .plusSeconds(6) .plusDays(2);
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 103.
  • 104.
  • 105.