SlideShare une entreprise Scribd logo
1  sur  113
Télécharger pour lire hors ligne
@JosePaumard
nouvelles choses que l’on peut faire avec
Java
Questions ?
#50new8
@JosePaumard
Date
@JosePaumard#50new8
Date : Instant
Un instant est un point de la ligne du temps
Instant start = Instant.now() ;
Instant end = Instant.now() ;
@JosePaumard#50new8
Date : Duration
Une « duration » est une durée
Instant start = Instant.now() ;
Instant end = Instant.now() ;
Duration elapsed = Duration.between(start, end) ;
long millis = elapsed.toMillis() ;
@JosePaumard#50new8
Date : Duration
On peut faire des calculs sur les « durations »
Instant start = Instant.now() ;
Instant end = Instant.now() ;
Duration elapsed = Duration.between(start, end) ;
long millis = elapsed.toMillis() ;
elapsed.plus(2L, TemporalUnit.SECONDS) ;
@JosePaumard#50new8
Date : LocalDate
Une LocalDate est une date empirique
LocalDate now = LocalDate.now() ;
LocalDate shakespeareDoB =
LocaleDate.of(1564, Month.APRIL, 23) ;
@JosePaumard#50new8
Date : Period
Une Period est une durée entre LocalDate
LocalDate now = LocalDate.now() ;
LocalDate shakespeareDoB =
LocalDate.of(1564, Month.APRIL, 23) ;
Period p = shakespeareDoB.until(now) ;
System.out.println("# years = " + p.getYears()) ;
> # years = 449
@JosePaumard#50new8
Date : Period
Une Period est une durée entre LocalDate
LocalDate now = LocalDate.now() ;
LocalDate shakespeareDoB =
LocalDate.of(1564, Month.APRIL, 23) ;
Period p = shakespeareDoB.until(now) ;
System.out.println("# years = " + p.getYears()) ;
long days = shakespeareDoB.until(now, ChronoUnit.DAYS) ;
System.out.println("# days = " + days) ; // 164_354
@JosePaumard#50new8
Date : TemporalAdjuster
Permet de trouver une date à partir d’une autre
LocalDate now = LocalDate.now() ;
LocalDate nextSunday =
now.with(TemporalAdjuster.next(DayOfWeek.SUNDAY)) ;
@JosePaumard#50new8
Date : TemporalAdjuster
Permet de trouver une date à partir d’une autre
14 méthodes statiques dans la boite à outils
firstDayOfMonth(), lastDayOfYear()
firstDayOfNextMonth()
LocalDate now = LocalDate.now() ;
LocalDate nextSunday =
now.with(TemporalAdjuster.next(DayOfWeek.SUNDAY)) ;
@JosePaumard#50new8
Date : TemporalAdjuster
Permet de trouver une date à partir d’une autre
14 méthodes statiques dans la boite à outils
firstInMonth(DayOfWeek.MONDAY)
next(DayOfWeek.FRIDAY)
LocalDate now = LocalDate.now() ;
LocalDate nextSunday =
now.with(TemporalAdjuster.next(DayOfWeek.SUNDAY)) ;
@JosePaumard#50new8
Date : LocalTime
Permet de coder une heure empirique : 10h20
LocalTime now = LocalTime.now() ;
LocalTime time = LocalTime.of(10, 20) ; // 10h20
@JosePaumard#50new8
Date : LocalTime
Permet de coder une heure empirique : 10h20
LocalTime now = LocalTime.now() ;
LocalTime time = LocalTime.of(10, 20) ; // 10h20
LocalTime lunchTime = LocalTime.of(12, 30) ;
LocalTime coffeeTime = lunchTime.plusHours(2) ; // 14h20
@JosePaumard#50new8
Date : ZonedTime
Permet de coder des heures localisées
Set<String> allZonesIds = ZoneId.getAvailableZoneIds() ;
String ukTZ = ZoneId.of("Europe/London") ;
@JosePaumard#50new8
Date : ZonedTime
Permet de coder des heures localisées
System.out.println(
ZonedDateTime.of(
1564, Month.APRIL.getValue(), 23, // year / month / day
10, 0, 0, 0, // h / mn / s / nanos
ZoneId.of("Europe/London"))
); // prints 1564-04-23T10:00-00:01:15[Europe/London]
@JosePaumard#50new8
Date : ZonedTime
On peut faire des calculs sur les heures localisées
ZonedDateTime currentMeeting =
ZonedDateTime.of(
LocalDate.of(2014, Month.APRIL, 18), // LocalDate
LocalTime.of(9, 30), // LocalTime
ZoneId.of("Europe/London")
) ;
ZonedDateTime nextMeeting =
currentMeeting.plus(Period.ofMonth(1)) ;
@JosePaumard#50new8
Date : ZonedTime
On peut faire des calculs sur les heures localisées
ZonedDateTime currentMeeting =
ZonedDateTime.of(
LocalDate.of(2014, Month.APRIL, 18), // LocalDate
LocalTime.of(9, 30), // LocalTime
ZoneId.of("Europe/London")
) ;
ZonedDateTime nextMeeting =
currentMeeting.plus(Period.ofMonth(1)) ;
ZonedDateTime nextMeetingUS =
nextMeeting.withZoneSameInstant(ZoneId.of("US/Central")) ;
@JosePaumard#50new8
Date : Formattage
Classe utilitaire : DateTimeFormatter
ZonedDateTime nextMeetingUS =
nextMeeting.withZoneSameInstant(ZoneId.of("US/Central"));
System.out.println(
DateTimeFormatter.ISO_DATE_TIME.format(nextMeetingUS)
);
// prints 2014-04-12T03:30:00-05:00[US/Central]
System.out.println(
DateTimeFormatter.RFC_1123_DATE_TIME.format(nextMeetingUS)
);
// prints Sat, 12 Apr 2014 03:30:00 -0500
@JosePaumard#50new8
Date : liens avec java.util.Date
Classe utilitaire : DateTimeFormatter
Date date = Date.from(instant); // legacy -> new API
Instant instant = date.toInstant(); // API -> legacy
@JosePaumard#50new8
Date : liens avec java.util.Date
Classe utilitaire : DateTimeFormatter
Date date = Date.from(instant); // legacy -> new API
Instant instant = date.toInstant(); // API -> legacy
TimeStamp time = TimeStamp.from(instant); // legacy -> new API
Instant instant = time.toInstant(); // API -> legacy
@JosePaumard#50new8
Date : liens avec java.util.Date
Classe utilitaire : DateTimeFormatter
Date date = Date.from(instant); // legacy -> new API
Instant instant = date.toInstant(); // API -> legacy
TimeStamp time = TimeStamp.from(instant); // legacy -> new API
Instant instant = time.toInstant(); // API -> legacy
Date date = Date.from(localDate); // legacy -> new API
LocalDate localDate = date.toLocalDate(); // API -> legacy
@JosePaumard#50new8
Date : liens avec java.util.Date
Classe utilitaire : DateTimeFormatter
Date date = Date.from(instant); // legacy -> new API
Instant instant = date.toInstant(); // API -> legacy
TimeStamp time = TimeStamp.from(instant); // legacy -> new API
Instant instant = time.toInstant(); // API -> legacy
Date date = Date.from(localDate); // legacy -> new API
LocalDate localDate = date.toLocalDate(); // API -> legacy
Time time = Time.from(localTime); // legacy -> new API
LocalTime localTime = time.toLocalTime(); // API -> legacy
String
@JosePaumard#50new8
String : Stream
Un stream sur les lettres qui composent une String
String s = "bonjour" ;
IntStream stream = s.chars() ;
stream.forEach(Sytem.out::println) ;
@JosePaumard#50new8
String : Stream
Un stream sur les lettres qui composent une String
Affiche :
String s = "bonjour" ;
IntStream stream = s.chars() ;
stream
.map(String::toUpperCase)
.forEach(Sytem.out::print) ;
> BONJOUR
@JosePaumard#50new8
String : expressions régulières
Construction de Stream à partir d’une regexp
// book est une grrrande chaîne
Stream<String> words =
Pattern
.compile("[^p{javaLetter}]")
.splitAsStream(book) ;
@JosePaumard#50new8
String : concaténation
Le naïf écrit :
String s1 = "bonjour" ;
String s2 = "le monde" ;
String s3 = s1 + " " + s2 ;
@JosePaumard#50new8
String : concaténation
L’ignorant lui dit d’écrire :
StringBuilder sb1 = new StringBuilder("bonjour") ;
sb1.append(" le monde") ;
String s3 = sb1.toString() ;
@JosePaumard#50new8
String : concaténation
L’ignorant lui dit d’écrire :
String s1 = "bonjour" ;
String s2 = "le monde" ;
String s3 = s1 + " " + s2 ;LINENUMBER 10 L2
NEW java/lang/StringBuilder
DUP
ALOAD 1
INVOKESTATIC java/lang/String.valueOf(Ljava/lang/Object;)Ljava/lang/String;
INVOKESPECIAL java/lang/StringBuilder.<init>(Ljava/lang/String;)V
LDC " "
INVOKEVIRTUAL java/lang/StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder;
ALOAD 2
INVOKEVIRTUAL java/lang/StringBuilder.append(Ljava/lang/String;)Ljava/lang/StringBuilder;
INVOKEVIRTUAL java/lang/StringBuilder.toString()Ljava/lang/String;
ASTORE 3
@JosePaumard#50new8
String : concaténation
Le spécialiste Java 8 écrit
// The JDK 8 way
StringJoiner sj = new StringJoiner(", ") ;
sj.add("one").add("two").add("three") ;
String s = sj.toString() ;
System.out.println(s) ;
@JosePaumard#50new8
String : concaténation
Le spécialiste Java 8 écrit
Ce qui affiche
// The JDK 8 way
StringJoiner sj = new StringJoiner(", ") ;
sj.add("one").add("two").add("three") ;
String s = sj.toString() ;
System.out.println(s) ;
> one, two, three
@JosePaumard#50new8
String : concaténation
Le spécialiste Java 8 écrit
Ce qui affiche
// The JDK 8 way
StringJoiner sj = new StringJoiner(", ", "{", "}") ;
sj.add("one").add("two").add("three") ;
String s = sj.toString() ;
System.out.println(s) ;
> {one, two, three}
@JosePaumard#50new8
String : concaténation
Le spécialiste Java 8 écrit
Ce qui affiche
// The JDK 8 way
StringJoiner sj = new StringJoiner(", ", "{", "}") ;
// on ne met rien dedans
String s = sj.toString() ;
System.out.println(s) ;
> {}
@JosePaumard#50new8
String : concaténation
S’utilise aussi à partir de String directement
Ce qui affiche
// From the String class, with a vararg
String s = String.join(", ", "one", "two", "three");
System.out.println(s);
> one, two, three
@JosePaumard#50new8
String : concaténation
S’utilise aussi à partir de String directement
Ce qui affiche
// From the String class, with an Iterable
String [] tab = {"one", "two", "three"} ;
String s = String.join(", ", tab) ;
System.out.println(s) ;
> one, two, three
I/O
@JosePaumard#50new8
I/O : lecture de fichiers texte
Stream implémente AutoCloseable
// Java 7 : try with resources and use of Paths
Path path = Paths.get("d:", "tmp", "debug.log");
try (Stream<String> stream = Files.lines(path)) {
stream.filter(line -> line.contains("ERROR"))
.findFirst()
.ifPresent(System.out::println);
} catch (IOException ioe) {
// handle the exception
}
@JosePaumard#50new8
I/O : lecture d’un répertoire
Files.list retourne les fichiers du répertoire
// Java 7 : try with resources and use of Paths
Path path = Paths.get("c:", "windows");
try (Stream<Path> stream = Files.list(path)) {
stream.filter(path -> path.toFile().isDirectory())
.forEach(System.out::println);
} catch (IOException ioe) {
// handle the exception
}
@JosePaumard#50new8
I/O : lecture d’une arborescence
Files.walk retourne les fichiers du sous-arbre
// Java 7 : try with resources and use of Paths
Path path = Paths.get("c:", "windows");
try (Stream<Path> stream = Files.walk(path)) {
stream.filter(path -> path.toFile().isDirectory())
.forEach(System.out::println);
} catch (IOException ioe) {
// handle the exception
}
@JosePaumard#50new8
I/O : lecture d’une arborescence
Files.walk retourne les fichiers du sous-arbre, profondeur
// Java 7 : try with resources and use of Paths
Path path = Paths.get("c:", "windows");
try (Stream<Path> stream = Files.walk(path, 2)) {
stream.filter(path -> path.toFile().isDirectory())
.forEach(System.out::println);
} catch (IOException ioe) {
// handle the exception
}
List
@JosePaumard#50new8
Iterable : forEach
ForEach : itère sur tous les éléments, prend un consumer
Ne marche pas sur les tableaux
// méthode forEach sur Iterable
List<String> strings =
Arrays.asList("one", "two", "three") ;
strings.forEach(System.out::println) ;
> one, two, three
@JosePaumard#50new8
Collection : removeIf
Retire un objet : prend un prédicat
// removes an element on a predicate
Collection<String> strings =
Arrays.asList("one", "two", "three", "four");
// works « in place », no Collections.unmodifiable...
Collection<String> list = new ArrayList<>(strings);
// returns true if the list has been modified
boolean b = list.removeIf(s -> s.length() > 4);
> one, two, four
@JosePaumard#50new8
List : replaceAll
Remplace un objet par sa transformée
// removes an element on a predicate
Collection<String> strings =
Arrays.asList("one", "two", "three", "four");
// works « in place », no Collections.unmodifiable...
Collection<String> list = new ArrayList<>(strings);
// returns nothing
list.replaceAll(String::toUpperCase);
> ONE, TWO, THREE, FOUR
@JosePaumard#50new8
List : sort
Tri une liste en place, prend un comparateur
// removes an element on a predicate
Collection<String> strings =
Arrays.asList("one", "two", "three", "four");
// works « in place », no Collections.unmodifiable...
Collection<String> list = new ArrayList<>(strings);
// returns nothing
list.sort(Comparator.naturalOrder()) ;
> four, one, three, two
Arrays
Parallel
@JosePaumard#50new8
Parallel Arrays
Arrays.parallelSetAll
long [] array = new long [...] ;
Arrays.parallelSetAll(array, index -> index % 3) ;
System.out.println(Arrays.toString(array)) ;
@JosePaumard#50new8
Parallel Arrays
Arrays.parallelPrefix : fold right
long [] array = new long [...] ;
Arrays.parallelPrefix(array, (l1, l2) -> l1 + l2) ;
System.out.println(Arrays.toString(array)) ;
long [] array = {1L, 1L, 1L, 1L} ;
> [1, 2, 3, 4]
@JosePaumard#50new8
Parallel Arrays
Arrays.sort : tri en place
long [] array = new long [...] ;
Arrays.parallelSort(array) ;
System.out.println(Arrays.toString(array)) ;
Comparator
@JosePaumard#50new8
Comparator !
Que dire de plus ?
Comparator.naturalOrder()
@JosePaumard#50new8
Comparator !
Que dire de plus ?
Comparator.naturalOrder()
public static
<T extends Comparable<? super T>> Comparator<T> naturalOrder() {
return (Comparator<T>)
Comparators.NaturalOrderComparator.INSTANCE;
}
@JosePaumard#50new8
Comparator !
enum NaturalOrderComparator
implements Comparator<Comparable<Object>> {
INSTANCE;
}
@JosePaumard#50new8
Comparator !
enum NaturalOrderComparator
implements Comparator<Comparable<Object>> {
INSTANCE;
public int compare(Comparable<Object> c1, Comparable<Object> c2) {
return c1.compareTo(c2);
}
}
@JosePaumard#50new8
Comparator !
enum NaturalOrderComparator
implements Comparator<Comparable<Object>> {
INSTANCE;
public int compare(Comparable<Object> c1, Comparable<Object> c2) {
return c1.compareTo(c2);
}
public Comparator<Comparable<Object>> reversed() {
return Comparator.reverseOrder();
}
}
@JosePaumard#50new8
Comparator !
Que dire de plus ?
Comparator.comparingBy(Person::getLastName)
.thenComparing(Person::getFirstName)
.thenComparing(Person::getAge)
Map
@JosePaumard#50new8
Map : forEach
Prend un BiConsumer
// the existing map
Map<String, Person> map = ... ;
map.forEach(
(key, value) -> System.out.println(key + " -> " + value)
) ;
@JosePaumard#50new8
Map : replace
Remplace une valeur avec sa clé
// the existing map
Map<String, Person> map = ... ;
// key, newValue
map.replace("six", john) ;
// key, oldValue, newValue
map.replace("six", peter, john) ;
@JosePaumard#50new8
Map : replaceAll
Transforme toutes les valeurs
// the existing map
Map<String, Person> map = ... ;
// key, oldValue
map.replaceAll(
(key, value) -> key + " -> " + value ;
) ;
@JosePaumard#50new8
Map : remove
Retire les paires clés / valeurs
// the existing map
Map<String, Person> map = ... ;
// key, oldValue
map.remove("six", john) ;
@JosePaumard#50new8
Map : compute
Calcule une valeur à partir de la clé et la valeur existante, et
d’une fonction qui fusionne la paire clé / valeur
// the existing map
Map<String, Person> map = ... ;
// key, oldValue
map.compute(
key,
(key, value) -> key + "::" + value
) ;
@JosePaumard#50new8
Map : merge
Calcule une valeur à partir de la clé, de l’actuelle valeur si
elle existe, et d’une fonction qui fusionne les valeurs
// the existing map
Map<String, Person> map = ... ;
// key, otherValue
map.merge(
key,
otherValue,
(value, otherValue) -> value.concat(", ").concat(otherValue)
) ;
@JosePaumard#50new8
Map : putIfAbsent
Ajoute une paire clé / valeur si la clé n’est pas déjà dans la
table
// the existing map
Map<String, Person> map = ... ;
// key, newValue
map.putIfAbsent("un", john) ;
@JosePaumard#50new8
Map : computeIfAbsent
Si la clé est absente : associe une valeur calculée par
exécution de la fonction. Dans tous les cas : retourne la
valeur (nouvelle ou ancienne)
// the existing map
Map<String, Map<String, Person>> map = ... ;
// key, newValue
map.computeIfAbsent(
"un",
key -> new HashMap<>()
)
.put(".un", john) ;
@JosePaumard#50new8
Map : computeIfPresent
Si la clé est présente : associe une valeur calculée par
exécution de la fonction. Retourne la valeur.
// the existing map
Map<String, Map<String, Person>> map = ... ;
// key, newValue
map.computeIfPresent(
"un", map,
(key, value) -> ... // la nouvelle valeur
)
.put(".un", john) ;
Completable
Future
@JosePaumard#50new8
CompletableFuture
Extension de Future
CompletableFuture<String> page =
CompletableFuture.supplyAsync(
) ;
@JosePaumard#50new8
CompletableFuture
Extension de Future
CompletableFuture<String> page =
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
) ;
@JosePaumard#50new8
CompletableFuture
Permet de créer des pipelines
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenApply(content -> getImages(content)) ;
@JosePaumard#50new8
CompletableFuture
Permet de créer des pipelines
CompletableFuture<List<Image>> images =
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenApply(content -> getImages(content)) ; // function
@JosePaumard#50new8
CompletableFuture
thenCompose : composition de tâches dans le futur
CompletableFuture<List<Image>> cf =
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenCompose(content -> getImages(content))
@JosePaumard#50new8
CompletableFuture
thenCompose : composition de tâches dans le futur
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenCompose(content -> getImages(content))
.thenApply(image -> writeToDisk(image)) ; // retourne CF<Boolean>
@JosePaumard#50new8
CompletableFuture
thenCompose : composition de tâches dans le futur
List<CompletableFuture<Boolean>> result =
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenCompose(content -> getImages(content))
.thenApply(image -> writeToDisk(image)) ; // retourne CF<Boolean>
@JosePaumard#50new8
CompletableFuture
allOf : composition de tâches dans le futur (anyOf existe)
CompletableFuture.allOf(
CompletableFuture.supplyAsync(
() ->
readWebPage(url)
)
.thenCompose(content -> getImages(content))
.thenApply(image -> writeToDisk(image))
)
.join() ;
@JosePaumard#50new8
CompletableFuture
thenCombine : combine plusieurs CF
Applique la fonction une fois les deux CF exécutés
CompletableFuture cf1 = ... ;
CompletableFuture cf2 = ... ;
cf1.thenCombine(cf2, (b1, b2) -> b1 & b2) ; // retourne la combinaison
// des résultats des CF
@JosePaumard#50new8
CompletableFuture
thenCombine : combine plusieurs CF
Applique la fonction une fois les deux CF exécutés
thenAcceptBoth, runAfterBoth
CompletableFuture cf1 = ... ;
CompletableFuture cf2 = ... ;
cf1.thenCombine(cf2, (b1, b2) -> b1 & b2) ; // retourne la combinaison
// des résultats des CF
@JosePaumard#50new8
CompletableFuture
applyToEither : utilise le premier résultat disponible
CompletableFuture cf1 = ... ;
CompletableFuture cf2 = ... ;
cf1.applyToEither(cf2, (b) -> ...) ; // s’applique au résultat
// du premier CF dispo
@JosePaumard#50new8
CompletableFuture
applyToEither : utilise le premier résultat disponible
acceptEither, runAfterEither
CompletableFuture cf1 = ... ;
CompletableFuture cf2 = ... ;
cf1.applyToEither(cf2, (b) -> ...) ; // s’applique au résultat
// du premier CF dispo
Concurrence
@JosePaumard#50new8
Variables atomiques
On avait :
AtomicLong atomic = new AtomicLong() ;
long l1 = atomic.incrementAndGet() ;
@JosePaumard#50new8
Variables atomiques
On a :
AtomicLong atomic = new AtomicLong() ;
long l1 = atomic.incrementAndGet() ;
long l2 = atomic.updateAndGet(l -> l*2 + 1) ;
@JosePaumard#50new8
Variables atomiques
On a :
AtomicLong atomic = new AtomicLong() ;
long l1 = atomic.incrementAndGet() ;
long l2 = atomic.updateAndGet(l -> l*2 + 1) ;
long l3 = atomic.accumulateAndGet(12L, (l1, l2) -> l1 % l2) ;
@JosePaumard#50new8
LongAdder
On a :
LongAdded adder = new LongAdder() ;
adder.increment() ; // dans un thread
adder.increment() ; // dans un autre thread
adder.increment() ; // encore dans un autre thread
long sum = adder.sum() ;
@JosePaumard#50new8
LongAccumulator
Même chose, mais on généralise :
LongAccumulator accu =
new LongAccumulator((l1, l2) -> Long.max(l1, l2), 0L) ;
accu.accumulate(value1) ; // dans un thread
accu.accumulate(value2) ; // dans un autre thread
accu.accumulate(value2) ; // encore dans un autre thread
long sum = accu.longValue() ;
@JosePaumard#50new8
StampedLock
Un lock avec lecture optimiste
StampedLock sl= new StampedLock() ;
long stamp = sl.writeLock() ;
try {
...
} finally {
sl.unlockWrite(stamp) ;
}
long stamp = sl.readLock() ;
try {
...
} finally {
sl.unlockRead(stamp) ;
}
@JosePaumard#50new8
StampedLock
Un lock avec lecture optimiste
Exclusivité entre read / write, mais…
StampedLock sl= new StampedLock() ;
long stamp = sl.writeLock() ;
try {
...
} finally {
sl.unlockWrite(stamp) ;
}
long stamp = sl.readLock() ;
try {
...
} finally {
sl.unlockRead(stamp) ;
}
@JosePaumard#50new8
StampedLock
Un lock avec lecture optimiste
StampedLock sl= new StampedLock() ;
long stamp = sl.tryOptimisticRead() ;
// ici on lit une variable qui peut être modifiée par un autre thread
if (lock.validate(stamp)) {
// la lecture est validée
} else {
// un autre thread a acquis un write lock
}
ConcurrentConcurrent
HashMap
@JosePaumard#50new8
ConcurrentHashMap
Réécriture complète de ConcurrentHashMap V7
Complètement thread-safe
N’utilise de lock ≠ ConcurrentHashMap V7
Nouvelles méthodes
@JosePaumard#50new8
ConcurrentHashMap
6000 lignes de code
@JosePaumard#50new8
ConcurrentHashMap
6000 lignes de code
54 classes membre
@JosePaumard#50new8
ConcurrentHashMap
6000 lignes de code
54 classes membre
Pour info : 58 classes dans java.util.concurrent
@JosePaumard#50new8
ConcurrentHashMap
6000 lignes de code
54 classes membre
Pour info : 58 classes dans java.util.concurrent
Nouveaux patterns !
@JosePaumard#50new8
ConcurrentHashMap
Ne plus utiliser size()
int count = map.size() ; // ne pas utiliser
count = map.mappingCount() ; // nouvelle méthode
@JosePaumard#50new8
ConcurrentHashMap
Ne plus utiliser
int count = map.size() ; // ne pas utiliser
long count = map.mappingCount() ; // nouvelle méthode
@JosePaumard#50new8
ConcurrentHashMap
Recherche d’éléments
search(), searchKey(), searchValue(), searchEntry()
ConcurrentHashMap<Integer, String> map = ... ;
map.search(10, (key, value) -> value.length() < key) ;
@JosePaumard#50new8
ConcurrentHashMap
Recherche d’éléments
search(), searchKey(), searchValue(), searchEntry()
ConcurrentHashMap<Integer, String> map = ... ;
map.search(10, (key, value) -> value.length() < key) ;
@JosePaumard#50new8
ConcurrentHashMap
Recherche d’éléments
10 : taux de parallélisme
Si la table compte plus de 10 éléments, alors la recherche
se fait en parallèle !
ConcurrentHashMap<Integer, String> map = ... ;
map.search(10, (key, value) -> value.length() < key) ;
@JosePaumard#50new8
ConcurrentHashMap
Recherche d’éléments
10 : taux de parallélisme
Si la table compte plus de 10 éléments, alors la recherche
se fait en parallèle !
On peut passer 0, ou Integer.MAX_VALUE
ConcurrentHashMap<Integer, String> map = ... ;
map.search(10, (key, value) -> value.length() < key) ;
@JosePaumard#50new8
ConcurrentHashMap
ForEach
forEach(), forEachKey(), forEachEntries()
ConcurrentHashMap<Integer, String> map = ... ;
map.forEach(10,
(key, value) ->
System.out.println(String.join(key, "->", value)
) ;
@JosePaumard#50new8
ConcurrentHashMap
Réduction
reduce(), reduceKey(), reduceEntries()
ConcurrentHashMap<Integer, String> map = ... ;
map.reduce(10,
(key, value) -> value.getName(), // transformation
(name1, name2) -> name1.length() > name2.length() ?
name1 : name2) // reduction
) ;
@JosePaumard#50new8
Pas de ConcurrentHashSet
Mais…
Set<String> set = ConcurrentHashMap.<String>.newKeySet() ;
@JosePaumard#50new8
Pas de ConcurrentHashSet
Mais…
Crée une concurrent hashmap dont les valeurs sont
Boolean.TRUE
Sert de set concurrent
Set<String> set = ConcurrentHashMap.<String>.newKeySet() ;
@JosePaumard
#50new8

Contenu connexe

Tendances

Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Jean-Michel Doudoux
 
Interface fonctionnelle, Lambda expression, méthode par défaut, référence de...
Interface fonctionnelle, Lambda expression, méthode par défaut,  référence de...Interface fonctionnelle, Lambda expression, méthode par défaut,  référence de...
Interface fonctionnelle, Lambda expression, méthode par défaut, référence de...MICHRAFY MUSTAFA
 
ArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateauArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateauJosé Paumard
 
Javascript pour les développeurs Java : quels sont les pièges à éviter ?
Javascript pour les développeurs Java : quels sont les pièges à éviter ?Javascript pour les développeurs Java : quels sont les pièges à éviter ?
Javascript pour les développeurs Java : quels sont les pièges à éviter ?FlorianBoulay
 
Java (8) eXperiments - DevoxxFR 2016
Java (8) eXperiments - DevoxxFR 2016Java (8) eXperiments - DevoxxFR 2016
Java (8) eXperiments - DevoxxFR 2016François Sarradin
 
Javascript : fondamentaux et OOP
Javascript : fondamentaux et OOPJavascript : fondamentaux et OOP
Javascript : fondamentaux et OOPJean-Pierre Vincent
 
Techday Arrow Group: Java 8
Techday Arrow Group: Java 8Techday Arrow Group: Java 8
Techday Arrow Group: Java 8Arrow Group
 
De java à swift en 2 temps trois mouvements
De java à swift en 2 temps trois mouvementsDe java à swift en 2 temps trois mouvements
De java à swift en 2 temps trois mouvementsDidier Plaindoux
 
Scala : programmation fonctionnelle
Scala : programmation fonctionnelleScala : programmation fonctionnelle
Scala : programmation fonctionnelleMICHRAFY MUSTAFA
 
Programmation fonctionnelle
Programmation fonctionnelleProgrammation fonctionnelle
Programmation fonctionnelleGeeks Anonymes
 
Android Optimisations Greendroid
Android Optimisations GreendroidAndroid Optimisations Greendroid
Android Optimisations GreendroidGDG Nantes
 
Introduction à Python - Achraf Kacimi El Hassani
Introduction à Python - Achraf Kacimi El HassaniIntroduction à Python - Achraf Kacimi El Hassani
Introduction à Python - Achraf Kacimi El HassaniShellmates
 
Asyncio: offrez des tulipes à vos entrées sorties asynchrones
Asyncio: offrez des tulipes à vos entrées sorties asynchronesAsyncio: offrez des tulipes à vos entrées sorties asynchrones
Asyncio: offrez des tulipes à vos entrées sorties asynchronestchappui
 
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...Normandy JUG
 
Librairies Java qui changent la vie
Librairies Java qui changent la vieLibrairies Java qui changent la vie
Librairies Java qui changent la viecluelessjoe
 
Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Yannick Chartois
 
Introduction au langage Go
Introduction au langage GoIntroduction au langage Go
Introduction au langage GoSylvain Wallez
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovyguest6e3bed
 

Tendances (20)

Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016Retours sur java 8 devoxx fr 2016
Retours sur java 8 devoxx fr 2016
 
Interface fonctionnelle, Lambda expression, méthode par défaut, référence de...
Interface fonctionnelle, Lambda expression, méthode par défaut,  référence de...Interface fonctionnelle, Lambda expression, méthode par défaut,  référence de...
Interface fonctionnelle, Lambda expression, méthode par défaut, référence de...
 
ArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateauArrayList et LinkedList sont dans un bateau
ArrayList et LinkedList sont dans un bateau
 
Javascript pour les développeurs Java : quels sont les pièges à éviter ?
Javascript pour les développeurs Java : quels sont les pièges à éviter ?Javascript pour les développeurs Java : quels sont les pièges à éviter ?
Javascript pour les développeurs Java : quels sont les pièges à éviter ?
 
Java (8) eXperiments - DevoxxFR 2016
Java (8) eXperiments - DevoxxFR 2016Java (8) eXperiments - DevoxxFR 2016
Java (8) eXperiments - DevoxxFR 2016
 
Javascript : fondamentaux et OOP
Javascript : fondamentaux et OOPJavascript : fondamentaux et OOP
Javascript : fondamentaux et OOP
 
Techday Arrow Group: Java 8
Techday Arrow Group: Java 8Techday Arrow Group: Java 8
Techday Arrow Group: Java 8
 
De java à swift en 2 temps trois mouvements
De java à swift en 2 temps trois mouvementsDe java à swift en 2 temps trois mouvements
De java à swift en 2 temps trois mouvements
 
Programmation Fonctionnelle
Programmation FonctionnelleProgrammation Fonctionnelle
Programmation Fonctionnelle
 
Scala : programmation fonctionnelle
Scala : programmation fonctionnelleScala : programmation fonctionnelle
Scala : programmation fonctionnelle
 
Programmation fonctionnelle
Programmation fonctionnelleProgrammation fonctionnelle
Programmation fonctionnelle
 
Android Optimisations Greendroid
Android Optimisations GreendroidAndroid Optimisations Greendroid
Android Optimisations Greendroid
 
Introduction à Python - Achraf Kacimi El Hassani
Introduction à Python - Achraf Kacimi El HassaniIntroduction à Python - Achraf Kacimi El Hassani
Introduction à Python - Achraf Kacimi El Hassani
 
Asyncio: offrez des tulipes à vos entrées sorties asynchrones
Asyncio: offrez des tulipes à vos entrées sorties asynchronesAsyncio: offrez des tulipes à vos entrées sorties asynchrones
Asyncio: offrez des tulipes à vos entrées sorties asynchrones
 
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
Fork / Join, Parallel Arrays, Lambdas : la programmation parallèle (trop ?) f...
 
Librairies Java qui changent la vie
Librairies Java qui changent la vieLibrairies Java qui changent la vie
Librairies Java qui changent la vie
 
Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8
 
Java SE 7
Java SE 7Java SE 7
Java SE 7
 
Introduction au langage Go
Introduction au langage GoIntroduction au langage Go
Introduction au langage Go
 
Présentation Groovy
Présentation GroovyPrésentation Groovy
Présentation Groovy
 

En vedette

Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJosé Paumard
 
Autumn collection JavaOne 2014
Autumn collection JavaOne 2014Autumn collection JavaOne 2014
Autumn collection JavaOne 2014José Paumard
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8José Paumard
 
Better Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design ThinkingBetter Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design ThinkingJeff Gothelf
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2Ido Flatow
 
Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017Experian
 
Conference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieConference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieZenika
 
Open Data v0.3
Open Data v0.3Open Data v0.3
Open Data v0.3Luca Mauri
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
Optimisez la performance de votre service client tout en maîtrisant votre b...
Optimisez la performance  de votre service client  tout en maîtrisant votre b...Optimisez la performance  de votre service client  tout en maîtrisant votre b...
Optimisez la performance de votre service client tout en maîtrisant votre b...Experian
 
Going reactive in java
Going reactive in javaGoing reactive in java
Going reactive in javaJosé Paumard
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJosé Paumard
 
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoiPerf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoipkernevez
 
Microbox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien RoyMicrobox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien Royekino
 
NightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteNightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteZenika
 
So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?Tomek Adamczewki
 
WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013Zenika
 
NightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéNightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéZenika
 

En vedette (20)

Java 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelizationJava 8, Streams & Collectors, patterns, performances and parallelization
Java 8, Streams & Collectors, patterns, performances and parallelization
 
Autumn collection JavaOne 2014
Autumn collection JavaOne 2014Autumn collection JavaOne 2014
Autumn collection JavaOne 2014
 
50 new things you can do with java 8
50 new things you can do with java 850 new things you can do with java 8
50 new things you can do with java 8
 
Better Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design ThinkingBetter Product Definition with Lean UX and Design Thinking
Better Product Definition with Lean UX and Design Thinking
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
 
Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017Séminaire en ligne - Email Kinetic - 30 Mai 2017
Séminaire en ligne - Email Kinetic - 30 Mai 2017
 
Conference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partieConference MicroServices101 - 1ere partie
Conference MicroServices101 - 1ere partie
 
Open Data v0.3
Open Data v0.3Open Data v0.3
Open Data v0.3
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
Optimisez la performance de votre service client tout en maîtrisant votre b...
Optimisez la performance  de votre service client  tout en maîtrisant votre b...Optimisez la performance  de votre service client  tout en maîtrisant votre b...
Optimisez la performance de votre service client tout en maîtrisant votre b...
 
Http2
Http2Http2
Http2
 
Going reactive in java
Going reactive in javaGoing reactive in java
Going reactive in java
 
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) BridgeJAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
 
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoiPerf ug   comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
Perf ug comment ne plus rajouter de ram a vos jvm sans savoir pourquoi
 
Microbox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien RoyMicrobox : Ma toolbox microservices - Julien Roy
Microbox : Ma toolbox microservices - Julien Roy
 
NightClazz Java 8 Decouverte
NightClazz Java 8 DecouverteNightClazz Java 8 Decouverte
NightClazz Java 8 Decouverte
 
So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?So, you wanna migrate to Java 9?
So, you wanna migrate to Java 9?
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013WTF - What's The Fold - Bordeaux JUG 2013
WTF - What's The Fold - Bordeaux JUG 2013
 
NightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery AvancéNightClazz Build Tools & Continuous Delivery Avancé
NightClazz Build Tools & Continuous Delivery Avancé
 

Similaire à 50 nouvelles choses que l'on peut faire avec Java 8

201303 - Java8
201303 - Java8201303 - Java8
201303 - Java8lyonjug
 
Future of java script web version
Future of java script web versionFuture of java script web version
Future of java script web versionSébastien Pertus
 
JavaScript pour les développeurs .NET
JavaScript pour les développeurs .NETJavaScript pour les développeurs .NET
JavaScript pour les développeurs .NETThomas Conté
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database ConnectivityKorteby Farouk
 
Comment développer un serveur métier en python/C++
Comment développer un serveur métier en python/C++Comment développer un serveur métier en python/C++
Comment développer un serveur métier en python/C++cppfrug
 
Nouveautés JavaScript dans le monde Microsoft
Nouveautés JavaScript dans le monde MicrosoftNouveautés JavaScript dans le monde Microsoft
Nouveautés JavaScript dans le monde Microsoftdavrous
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanMicrosoft
 
BEBUTANT JAVA
BEBUTANT  JAVABEBUTANT  JAVA
BEBUTANT JAVAviolonjo
 
Programmation orientée objet : Object, classe et encapsulation
Programmation orientée objet : Object, classe et encapsulationProgrammation orientée objet : Object, classe et encapsulation
Programmation orientée objet : Object, classe et encapsulationECAM Brussels Engineering School
 
Partie1 TypeScript
Partie1 TypeScriptPartie1 TypeScript
Partie1 TypeScriptHabib Ayad
 
Réu technodejs
Réu technodejsRéu technodejs
Réu technodejsnaholyr
 
Procédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsProcédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsDenis Voituron
 
Javascript ne se limite pas à jquery
Javascript ne se limite pas à jqueryJavascript ne se limite pas à jquery
Javascript ne se limite pas à jqueryneuros
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en gokader15
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en goAbdoul Kader Sarambe
 
Conception émergente
Conception émergenteConception émergente
Conception émergenteazeau
 

Similaire à 50 nouvelles choses que l'on peut faire avec Java 8 (20)

201303 - Java8
201303 - Java8201303 - Java8
201303 - Java8
 
Spring 3.0
Spring 3.0Spring 3.0
Spring 3.0
 
Future of java script web version
Future of java script web versionFuture of java script web version
Future of java script web version
 
Change mind about JS
Change mind about JSChange mind about JS
Change mind about JS
 
JavaScript pour les développeurs .NET
JavaScript pour les développeurs .NETJavaScript pour les développeurs .NET
JavaScript pour les développeurs .NET
 
Java Database Connectivity
Java Database ConnectivityJava Database Connectivity
Java Database Connectivity
 
Comment développer un serveur métier en python/C++
Comment développer un serveur métier en python/C++Comment développer un serveur métier en python/C++
Comment développer un serveur métier en python/C++
 
Nouveautés JavaScript dans le monde Microsoft
Nouveautés JavaScript dans le monde MicrosoftNouveautés JavaScript dans le monde Microsoft
Nouveautés JavaScript dans le monde Microsoft
 
TP2 RMI
TP2 RMITP2 RMI
TP2 RMI
 
Découverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet SpartanDécouverte du moteur de rendu du projet Spartan
Découverte du moteur de rendu du projet Spartan
 
BEBUTANT JAVA
BEBUTANT  JAVABEBUTANT  JAVA
BEBUTANT JAVA
 
Programmation orientée objet : Object, classe et encapsulation
Programmation orientée objet : Object, classe et encapsulationProgrammation orientée objet : Object, classe et encapsulation
Programmation orientée objet : Object, classe et encapsulation
 
Partie1 TypeScript
Partie1 TypeScriptPartie1 TypeScript
Partie1 TypeScript
 
Réu technodejs
Réu technodejsRéu technodejs
Réu technodejs
 
Procédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénientsProcédures CLR pour SQL Server : avantages et inconvénients
Procédures CLR pour SQL Server : avantages et inconvénients
 
Patron observer
Patron observerPatron observer
Patron observer
 
Javascript ne se limite pas à jquery
Javascript ne se limite pas à jqueryJavascript ne se limite pas à jquery
Javascript ne se limite pas à jquery
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en go
 
Pratique de la programmation en go
Pratique de la programmation en goPratique de la programmation en go
Pratique de la programmation en go
 
Conception émergente
Conception émergenteConception émergente
Conception émergente
 

Plus de José Paumard

Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19José Paumard
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfJosé Paumard
 
The Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingThe Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingJosé Paumard
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKJosé Paumard
 
Designing functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patternsDesigning functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patternsJosé Paumard
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of FlatteryJosé Paumard
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of FlatteryJosé Paumard
 
Designing functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor PatternDesigning functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor PatternJosé Paumard
 
Construire son JDK en 10 étapes
Construire son JDK en 10 étapesConstruire son JDK en 10 étapes
Construire son JDK en 10 étapesJosé Paumard
 
Java Keeps Throttling Up!
Java Keeps Throttling Up!Java Keeps Throttling Up!
Java Keeps Throttling Up!José Paumard
 
Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2José Paumard
 
Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1José Paumard
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowJosé Paumard
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the WildJosé Paumard
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJosé Paumard
 
Linked to ArrayList: the full story
Linked to ArrayList: the full storyLinked to ArrayList: the full story
Linked to ArrayList: the full storyJosé Paumard
 

Plus de José Paumard (20)

Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19
 
From Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdfFrom Java 11 to 17 and beyond.pdf
From Java 11 to 17 and beyond.pdf
 
The Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern MatchingThe Future of Java: Records, Sealed Classes and Pattern Matching
The Future of Java: Records, Sealed Classes and Pattern Matching
 
Deep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UKDeep Dive Java 17 Devoxx UK
Deep Dive Java 17 Devoxx UK
 
Designing functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patternsDesigning functional and fluent API: application to some GoF patterns
Designing functional and fluent API: application to some GoF patterns
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 
The Sincerest Form of Flattery
The Sincerest Form of FlatteryThe Sincerest Form of Flattery
The Sincerest Form of Flattery
 
Designing functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor PatternDesigning functional and fluent API: example of the Visitor Pattern
Designing functional and fluent API: example of the Visitor Pattern
 
Construire son JDK en 10 étapes
Construire son JDK en 10 étapesConstruire son JDK en 10 étapes
Construire son JDK en 10 étapes
 
Java Keeps Throttling Up!
Java Keeps Throttling Up!Java Keeps Throttling Up!
Java Keeps Throttling Up!
 
Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2Lambdas and Streams Master Class Part 2
Lambdas and Streams Master Class Part 2
 
Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1Lambda and Stream Master class - part 1
Lambda and Stream Master class - part 1
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Java Full Throttle
Java Full ThrottleJava Full Throttle
Java Full Throttle
 
Collectors in the Wild
Collectors in the WildCollectors in the Wild
Collectors in the Wild
 
Streams in the wild
Streams in the wildStreams in the wild
Streams in the wild
 
JAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridgeJAX RS and CDI bike the reactive bridge
JAX RS and CDI bike the reactive bridge
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 
Linked to ArrayList: the full story
Linked to ArrayList: the full storyLinked to ArrayList: the full story
Linked to ArrayList: the full story
 
Free your lambdas
Free your lambdasFree your lambdas
Free your lambdas
 

Dernier

Annie Ernaux Extérieurs. pptx. Exposition basée sur un livre .
Annie   Ernaux  Extérieurs. pptx. Exposition basée sur un livre .Annie   Ernaux  Extérieurs. pptx. Exposition basée sur un livre .
Annie Ernaux Extérieurs. pptx. Exposition basée sur un livre .Txaruka
 
Formation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipFormation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipM2i Formation
 
Presentation de la plateforme Moodle - avril 2024
Presentation de la plateforme Moodle - avril 2024Presentation de la plateforme Moodle - avril 2024
Presentation de la plateforme Moodle - avril 2024Gilles Le Page
 
Présentation_ Didactique 1_SVT (S4) complet.pptx
Présentation_ Didactique 1_SVT (S4) complet.pptxPrésentation_ Didactique 1_SVT (S4) complet.pptx
Présentation_ Didactique 1_SVT (S4) complet.pptxrababouerdighi
 
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdfSKennel
 
Cours SE Le système Linux : La ligne de commande bash - IG IPSET
Cours SE Le système Linux : La ligne de commande bash - IG IPSETCours SE Le système Linux : La ligne de commande bash - IG IPSET
Cours SE Le système Linux : La ligne de commande bash - IG IPSETMedBechir
 
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...Faga1939
 
Evaluation du systeme d'Education. Marocpptx
Evaluation du systeme d'Education. MarocpptxEvaluation du systeme d'Education. Marocpptx
Evaluation du systeme d'Education. MarocpptxAsmaa105193
 
le present des verbes reguliers -er.pptx
le present des verbes reguliers -er.pptxle present des verbes reguliers -er.pptx
le present des verbes reguliers -er.pptxmmatar2
 
Cours SE Gestion des périphériques - IG IPSET
Cours SE Gestion des périphériques - IG IPSETCours SE Gestion des périphériques - IG IPSET
Cours SE Gestion des périphériques - IG IPSETMedBechir
 
Saint Georges, martyr, et la lègend du dragon.pptx
Saint Georges, martyr, et la lègend du dragon.pptxSaint Georges, martyr, et la lègend du dragon.pptx
Saint Georges, martyr, et la lègend du dragon.pptxMartin M Flynn
 
Fondation Louis Vuitton. pptx
Fondation      Louis      Vuitton.   pptxFondation      Louis      Vuitton.   pptx
Fondation Louis Vuitton. pptxTxaruka
 
Zotero avancé - support de formation doctorants SHS 2024
Zotero avancé - support de formation doctorants SHS 2024Zotero avancé - support de formation doctorants SHS 2024
Zotero avancé - support de formation doctorants SHS 2024Alain Marois
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.Franck Apolis
 
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIE
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIEBONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIE
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIEgharebikram98
 
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdfSKennel
 
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdfSKennel
 
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdf
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdfSciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdf
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdfSKennel
 

Dernier (20)

Annie Ernaux Extérieurs. pptx. Exposition basée sur un livre .
Annie   Ernaux  Extérieurs. pptx. Exposition basée sur un livre .Annie   Ernaux  Extérieurs. pptx. Exposition basée sur un livre .
Annie Ernaux Extérieurs. pptx. Exposition basée sur un livre .
 
Formation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadershipFormation M2i - Comprendre les neurosciences pour développer son leadership
Formation M2i - Comprendre les neurosciences pour développer son leadership
 
Presentation de la plateforme Moodle - avril 2024
Presentation de la plateforme Moodle - avril 2024Presentation de la plateforme Moodle - avril 2024
Presentation de la plateforme Moodle - avril 2024
 
Présentation_ Didactique 1_SVT (S4) complet.pptx
Présentation_ Didactique 1_SVT (S4) complet.pptxPrésentation_ Didactique 1_SVT (S4) complet.pptx
Présentation_ Didactique 1_SVT (S4) complet.pptx
 
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_IA.pdf
 
Cours SE Le système Linux : La ligne de commande bash - IG IPSET
Cours SE Le système Linux : La ligne de commande bash - IG IPSETCours SE Le système Linux : La ligne de commande bash - IG IPSET
Cours SE Le système Linux : La ligne de commande bash - IG IPSET
 
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
LA MONTÉE DE L'ÉDUCATION DANS LE MONDE DE LA PRÉHISTOIRE À L'ÈRE CONTEMPORAIN...
 
Evaluation du systeme d'Education. Marocpptx
Evaluation du systeme d'Education. MarocpptxEvaluation du systeme d'Education. Marocpptx
Evaluation du systeme d'Education. Marocpptx
 
DO PALÁCIO À ASSEMBLEIA .
DO PALÁCIO À ASSEMBLEIA                 .DO PALÁCIO À ASSEMBLEIA                 .
DO PALÁCIO À ASSEMBLEIA .
 
le present des verbes reguliers -er.pptx
le present des verbes reguliers -er.pptxle present des verbes reguliers -er.pptx
le present des verbes reguliers -er.pptx
 
Cours SE Gestion des périphériques - IG IPSET
Cours SE Gestion des périphériques - IG IPSETCours SE Gestion des périphériques - IG IPSET
Cours SE Gestion des périphériques - IG IPSET
 
Saint Georges, martyr, et la lègend du dragon.pptx
Saint Georges, martyr, et la lègend du dragon.pptxSaint Georges, martyr, et la lègend du dragon.pptx
Saint Georges, martyr, et la lègend du dragon.pptx
 
Fondation Louis Vuitton. pptx
Fondation      Louis      Vuitton.   pptxFondation      Louis      Vuitton.   pptx
Fondation Louis Vuitton. pptx
 
Zotero avancé - support de formation doctorants SHS 2024
Zotero avancé - support de formation doctorants SHS 2024Zotero avancé - support de formation doctorants SHS 2024
Zotero avancé - support de formation doctorants SHS 2024
 
A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.A3iFormations, organisme de formations certifié qualiopi.
A3iFormations, organisme de formations certifié qualiopi.
 
Pâques de Sainte Marie-Euphrasie Pelletier
Pâques de Sainte Marie-Euphrasie PelletierPâques de Sainte Marie-Euphrasie Pelletier
Pâques de Sainte Marie-Euphrasie Pelletier
 
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIE
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIEBONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIE
BONNES PRATIQUES DE FABRICATION RESUME SIMPLIFIE
 
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_EtudiantActeur.pdf
 
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdfSciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdf
SciencesPo_Aix_InnovationPédagogique_Atelier_FormationRecherche.pdf
 
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdf
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdfSciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdf
SciencesPo_Aix_InnovationPédagogique_Conférence_SK.pdf
 

50 nouvelles choses que l'on peut faire avec Java 8