Implemented helper class Interval.