Change `void accept` to `boolean accept`

As per a change @akarnokd did elsewhere with `accept2` method.