add equals and hashCode to Interval