-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the ReadOnly interfaces #154
Refactor the ReadOnly interfaces #154
Conversation
There are three interfaces that serve a similar purpose: ReadOnlyPatientRecords, ReadOnlyRoomList, and ReadOnlyTaskList. This results in code duplication. Let's refactor these interfaces into one using generics: ReadOnlyList<T>, where T can be PatientRecords, RoomList, or TaskList.
6373fd9
to
61bf0b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Good learning point for using Java Generics, definitely makes it neater!
…factor-readonlylist
Codecov Report
@@ Coverage Diff @@
## master #154 +/- ##
=========================================
Coverage 67.42% 67.42%
Complexity 752 752
=========================================
Files 117 117
Lines 2646 2646
Branches 328 328
=========================================
Hits 1784 1784
Misses 743 743
Partials 119 119
Continue to review full report at Codecov.
|
There are currently three interfaces that serve a similar purpose:
ReadOnlyPatientRecords
,ReadOnlyRoomList
, andReadOnlyTaskList
.We can refactor these interfaces into one using generics
ReadOnlyList<T>
to avoid code duplication.Other changes:
UniqueRoomList
to theroom
package