Skip to content

Conversation

@im-Lily
Copy link
Collaborator

@im-Lily im-Lily commented Jul 2, 2023

개요

빌더 패턴 추가

작업사항

  • 빌더 패턴 자바 코드 추가
  • 빌더 패턴 코틀린 코드 추가

PR 요청사항

@im-Lily im-Lily requested a review from Slowth-KIM July 2, 2023 11:12
Copy link
Member

@Slowth-KIM Slowth-KIM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ktlint 적용 안된 곳이 보여요!

import com.gof.pattern.builder.before.TourPlan
import java.time.LocalDate

class DefaultTourBuilder : TourPlanBuilder {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1
코틀린에서 data class를 사용하면 getter, setter, constructor 를 만들어준다고 알고 있습니다.
data class 로 구현하면 어떻게 될까요?

// TourPlan longBeachTrip = builder.title("롱비치")
// .startDate(LocalDate.of(2023, 10, 5))
// .getPlan();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5
주석한 곳은 필요없으면 지워도 될 듯합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants