Combined highly similar comparison methods

I don't think this makes the new comparison method particularly more complex. The only thing I don't like about it is passing in three parameters.