Last active
May 12, 2019 09:12
-
-
Save ohade/d63c2909d7d58d0fa7560cb38b3317a5 to your computer and use it in GitHub Desktop.
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
public class EntranceChecker { | |
private final Set<String> names; | |
public EntranceChecker(Set<String> names) { | |
this.names = names; | |
} | |
public boolean isInTheGuestList(Person person) { | |
if(person == null) { | |
return true; | |
} | |
return names.contains(person.getName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment