First sweep line implementation with Java