-
-
Save pawelpluta/3543ee5b45e80877b32bdad705be9910 to your computer and use it in GitHub Desktop.
Article: Law of Demeter - direct value return
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Team { | |
private Member manager; | |
private List<Member> members; | |
List<Member> getMembers() { | |
return members; | |
} | |
String managerMail() { | |
Contact contact = manager.getContact(); | |
return contact.getMail(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment