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

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

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.