code: private static boolean polylineTouchesPolyline_(Polyline polyline_a,
  			Polyline polyline_b, double tolerance,
  			ProgressTracker progress_tracker) {
  		// Quick rasterize test to see whether the the geometries are disjoint.
  		if (tryRasterizedContainsOrDisjoint_(polyline_a, polyline_b, tolerance,
  				false) == Relation.disjoint)
  			return false;
  
  		AttributeStreamOfDbl intersections = new AttributeStreamOfDbl(0);
  
  		int dim = linearPathIntersectsLinearPathMaxDim_(polyline_a, polyline_b,
  				tolerance, intersections);
  
  		if (dim != 0)
  			return false;
  
  		MultiPoint intersection = new MultiPoint();
  
  		for (int i = 0; i < intersections.size(); i += 2) {
  			double x = intersections.read(i);
  			double y = intersections.read(i + 1);
  			intersection.add(x, y);
  		}
  
  		MultiPoint boundary_a_b = (MultiPoint) (polyline_a.getBoundary());
  		MultiPoint boundary_b = (MultiPoint) (polyline_b.getBoundary());
  
  		boundary_a_b.add(boundary_b, 0, boundary_b.getPointCount());
  
  		return multiPointContainsMultiPointBrute_(boundary_a_b, intersection,
  				tolerance);
  	}
docs: Returns true if polyline_a touches polyline_b.