Skip to content

Instantly share code, notes, and snippets.

@ohade
Last active May 12, 2019 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohade/339a9b360b7c3cb5a55945aae77ccfa4 to your computer and use it in GitHub Desktop.
Save ohade/339a9b360b7c3cb5a55945aae77ccfa4 to your computer and use it in GitHub Desktop.
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