Last active
May 12, 2019 08:42
-
-
Save ohade/339a9b360b7c3cb5a55945aae77ccfa4 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; | |
} | |
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