import java.time.LocalDate;import java.time.Month;public record Paystub(int amount, int bonus, String reasonCode) { public static Paystub noPay(String reasonCode) { return new Paystub(0, 0, reasonCode); }}public class Employee { private boolean isSeparated; private boolean isRetired; private int salary; public Employee(boolean isSeparated, boolean isRetired, int salary) ..
//[Before]public class Calculator { public static void main(String[] args) { List people = List.of( new Person("kim", 18, 28000000), new Person("lee", 19, 30000000), new Person("park", 20, 35000000) ); var averageAge = 0; var averageSalary = 0; for(Person person : people) { averageAge += person.getAge()..

Ch06.08 Introduce Parameter Object 매개변수 객체 만들기//[Before]public class Station {... public List readingsOutsideRange(int min, int max) { return readings.stream() .filter(t -> t.getTemperature() max) .toList(); }}//[After-Step01]public class Station {... public List readingsOutsideRange(NumberRange range) { return readings.stream() .filter(t->t.getTemperature() range.getMax()) .toList..
https://docs.google.com/spreadsheets/d/1nFx-PjZ9Qs3QBZFzaMo6MSUSrWjSsO-iz5kpBtlVRPQ/edit?gid=866204681#gid=866204681 리팩터링 이름 비교 & IDE들이 제공하는 리팩터링 목록_『리팩터링, 2판』(개앞맵시/남기혁 옮김,ABCDEFGHIJKLMNOPQRSTUVWXY2판// 지원 깃허브대표 IDE들이 제공하는 자동 리팩터링// 책에서 소개하는 범용 기법들 외에 각 언어에 특화된 다양한 기법들을 추가로 제공하니 아래 링크를 클릭하여 자세히docs.google.com https://github.com/WegraLee/Refactoring GitHub - WegraLee/Refactoring: 『리팩터링, 2판』(한빛미디어,..