~/talk

Transforming Code to Java 8

Talkat SpringOne2GX 2015 · 2015-09-14..09-17· [java]
links:none on file
slides:none on file

Step-by-step refactor examples show how lambdas plus java.util.stream (IntStream.range, Stream.iterate), Collectors.joining, Optional, Comparator.comparing/thenComparing and AutoCloseable/try‑with‑resources replace anonymous classes, loops and flags; an isPrime uses IntStream.range().noneMatch, first 100 primes use infinite lazy streams with filter map limit collect, findFirst returns Optional, and joining avoids comma logic. Code becomes more concise (claims 40–50% weight reduction), uses effectively final variables, and an implemented execute‑around method pattern encloses resource setup/cleanup and works as expected.

AI-written summary · about

  1. 0:00Introduction to Java 8
  2. 1:13Imperative to functional style
  3. 5:48Refactoring thread pool code
  4. 15:19Prime number example
  5. 20:36Stream iteration and laziness
  6. 33:54Finding first available time slot
  7. 44:50File processing example
  8. 51:30Sorting with comparators
  9. 1:04:40Execute around method pattern
  10. 1:27:59Performance and testing
  11. 1:30:29Q&A and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.