Skip to content

Instantly share code, notes, and snippets.

@ohade
Last active May 12, 2019 09:12
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/d63c2909d7d58d0fa7560cb38b3317a5 to your computer and use it in GitHub Desktop.
Save ohade/d63c2909d7d58d0fa7560cb38b3317a5 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;
}
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