class SelfCheckingPartyRepository implements PartyRepository {

    @Override
    public AcceptResult accept(String owner, String player) {
        // A player can not accept party request from himself.
        return owner.equalsIgnoreCase(player) ? AcceptResult.ACCEPT_SELF : delegate.accept(owner, player);
    }

}