Implements classify function for Interval class