Add equals method to Violation.

Maybe you can write a closure instead of the 2 foreach loops. This way we can read you make a double attribute iteration & comparison, from both sides.