Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
자바에서 코틀린으로
by
덩컨 맥그레거
,
냇 프라이스
,
오현석
November 2022
Beginner to intermediate
544 pages
12h 39m
Korean
Hanbit Media, Inc.
Content preview from
자바에서 코틀린으로
310
자바에서 코틀린으로
예제
15.25
[
encapsulated
-
collections
.
10
:
src
/
main
/
java
/
travelator
/
UI
.
java
]
public void render(Iterable<Journey> route) {
for (var journey : route) {
render(journey);
}
}
확장을 지워도 코틀린 클라이언트는 이미
List
의 메서드를 호출하고 있으므로 아무 영향이 없
다. 따라서 전체 변환이 거의 끝났다. 이제는 아무 일도 하지 않는
withJourneyAt
을 인라이닝
할 수 있다. 이렇게 하면 다음과 같은
Route
가 남는다.
예제
15.26
[
encapsulated
-
collections
.
10
:
src
/
main
/
java
/
travelator
/
itinerary
/
Route
.
kt
]
typealias Route = List<Journey>
val Route.departsFrom: Location
get() = first().departsFrom
val Route.arrivesAt: Location
get() = last().arrivesAt
val Route.duration: Duration
get() = Duration.between(
first().departureTime,
last().arrivalTime ...
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판)
오현석, 미샤 고렐릭, 이안 오스발트
러닝 타입스크립트
조시 골드버그
실리콘밸리 리더십
김정혜, 마이클 롭
머신러닝 시스템 설계
칩 후옌
Publisher Resources
ISBN: 9791169210447