Skip to Content
자바에서 코틀린으로
book

자바에서 코틀린으로

by 덩컨 맥그레거, 냇 프라이스, 오현석
November 2022
Beginner to intermediate
544 pages
12h 39m
Korean
Hanbit Media, Inc.
Content preview from 자바에서 코틀린으로
260
자바에서 코틀린으로
에 스트림이 스루풋
throughput
을 위해서는 좋은 선택인 것처럼 보인다. 그렇다면 왜 스트림을 코
틀린으로 변환해야 할까? 하지만 이런 태도를 바라고 이 책을 구입하지는 않았을 것이다. 따라
서 리팩터링의 매 단계마다 성능을 측정하는 것으로 가정하면서 성능이 크게 저하되는 경우에
만 리팩터링을 멈출 것이다.
13.7.1
이터러블을 먼저 고려하기
코드를 살펴보면 두 가지 단계를 볼 수 있다. 첫 단계는 길이가 정해지지 않은 입력을 처리해서
메모리상에 컬렉션을 만든다.
예제
13.5
[
streams
-
to
-
sequences
.
2
:
src
/
main
/
java
/
travelator
/
analytics
/
MarketingAnalytics
.
kt
]
val eventsForSuccessfulBookings = eventStore
.queryAsStream(“type=CompletedBooking&timerange=$timeRange”)
.flatMap { event ->
val interactionId = event[“interactionId”] as String
eventStore.queryAsStream(“interactionId=$interactionId”)
}
val bookingEventsByInteractionId = eventsForSuccessfulBookings.collect( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

고성능 파이썬(2판)

고성능 파이썬(2판)

오현석, 미샤 고렐릭, 이안 오스발트
러닝 타입스크립트

러닝 타입스크립트

조시 골드버그
실리콘밸리 리더십

실리콘밸리 리더십

김정혜, 마이클 롭

Publisher Resources

ISBN: 9791169210447