Update Interval.java

Corrected use of generic to make the implementation fully Generic.