Skip to content

Instantly share code, notes, and snippets.

Created Dec 20, 2020
What would you like to do?
Article: Law of Demeter - shameless assignment
class Team {
private Member manager;
private List<Member> members;
List<Member> getMembers() {
return members;
String managerName() {
Contact contact = manager.getContact();
PersonalData personalData = contact.getPersonalData();
return String.format("%s %s", personalData.getName(), personalData.getSurname());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment