Skip to content

Instantly share code, notes, and snippets.

@ohade
Last active May 10, 2019 09:03
Show Gist options
  • Save ohade/1f7e1e77898447cf2d10e1862486ac45 to your computer and use it in GitHub Desktop.
Save ohade/1f7e1e77898447cf2d10e1862486ac45 to your computer and use it in GitHub Desktop.
Bouncer class for medium article
public class Bouncer {
private final EntranceChecker entranceChecker;
public Bouncer(EntranceChecker entranceChecker) {
this.entranceChecker = entranceChecker;
}
public boolean shouldBlock(Person person) {
return !entranceChecker.isInTheGuestList(person);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment