public void filterSegments ( List < Interval > allSegments ) { segmentsToDelete = Lists . newArrayList ( Iterables . filter ( allSegments , new Predicate < Interval > ( ) { @ Override public boolean apply ( Interval i ) { return i . fallsIn ( interval ) ; } } ) ) ; }
Retain segments only overlapping with the range .