Added hashcode method to Rule.java