title: Java Class to check if a line intersects a shape
body: <p>Is there a class in the Java API that I can utilize to check if a line intersects a shape, given the starting and ending coordinates. I have tried playing around with Line2D objects, but the intersects() function for that class only seems to take in rectangular coordinates and Rectangle2D objects, which doesn't suit my purposes as my shapes can have any number of sides.</p>