use the interval_ends class to store the endpoints of an interval.  I can than do common checks on it.