code: private static boolean linearPathIntersectsLinearPath_(
  			MultiPath multipathA, MultiPath multipathB, double tolerance) {
  		MultiPathImpl multi_path_impl_a = (MultiPathImpl) multipathA._getImpl();
  		MultiPathImpl multi_path_impl_b = (MultiPathImpl) multipathB._getImpl();
  
  		SegmentIteratorImpl segIterA = multi_path_impl_a.querySegmentIterator();
  		SegmentIteratorImpl segIterB = multi_path_impl_b.querySegmentIterator();
  
          PairwiseIntersectorImpl intersector = new PairwiseIntersectorImpl(multi_path_impl_a, multi_path_impl_b, tolerance, false);
  
  		while (intersector.next()) {
  			int vertex_a = intersector.getRedElement();
  			int vertex_b = intersector.getBlueElement();
  
  			segIterA.resetToVertex(vertex_a);
  			segIterB.resetToVertex(vertex_b);
  			Segment segmentA = segIterA.nextSegment();
  			Segment segmentB = segIterB.nextSegment();
  
  			int result = segmentB.intersect(segmentA, null, null, null,
  					tolerance);
  
  			if (result > 0) {
  				return true;
  			}
  		}
  
  		return false;
  	}
docs: segments of _multipathB.