Skip to content

Instantly share code, notes, and snippets.

@pawelpluta

pawelpluta/Team.java Secret

Created Dec 20, 2020
Embed
What would you like to do?
Article: Law of Demeter - direct value return
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