Update Interval.java

corrected the equals method of 'Interval'