Skip to content

Part six#6

Open
oleksiipet wants to merge 5 commits intohyperskill:masterfrom
oleksiipet:part-six
Open

Part six#6
oleksiipet wants to merge 5 commits intohyperskill:masterfrom
oleksiipet:part-six

Conversation

@oleksiipet
Copy link

No description provided.


logs.add(action);

switch (action) {
Copy link

Choose a reason for hiding this comment

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

It may be useful to apply something like the command pattern together with a simple factory here instead of this big switch. It would isolate this code from possible changes in further. Each private method here can be represented like a small object which does an action.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for review. Committed changes about that.

Copy link

Choose a reason for hiding this comment

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

No problems. In general, your code looks pretty well.
Therefore, nothing to complain about here. You can use more advanced concepts, even if they are not yet explained in the topics. For example - Stream API and functional interfaces.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants