refactoring : lazy element - collapse hierarchy
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.example.refactoring._13_loops._33_replace_loop_with_pipeline;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.example.refactoring._14_lazy_element._34_collapse_hierarchy;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public class Reservation {
|
||||
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
private List<String> members;
|
||||
|
||||
private String owner;
|
||||
|
||||
private boolean paid;
|
||||
|
||||
private String courtNumber;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.example.refactoring._14_lazy_element._34_collapse_hierarchy._before;
|
||||
|
||||
public class CourtReservation extends Reservation {
|
||||
|
||||
private String courtNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.example.refactoring._14_lazy_element._34_collapse_hierarchy._before;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public class Reservation {
|
||||
|
||||
private LocalDateTime startDateTime;
|
||||
|
||||
private LocalDateTime endDateTime;
|
||||
|
||||
private List<String> members;
|
||||
|
||||
private String owner;
|
||||
|
||||
private boolean paid;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user