added hasInterval

hasInterval is a function what checks if the given interval is fully
contained by one of the stored intervals or not.