Java implementation of interval tree