- java.lang.Object
- 
- java.awt.geom.Line2D
 
- 
- Direct Known Subclasses:
- Line2D.Double,- Line2D.Float
 
 public abstract class Line2D extends Object implements Shape, Cloneable ThisLine2Drepresents a line segment in(x,y)coordinate space.This class is only the abstract superclass for all objects that store a 2D line segment. The actual storage representation of the coordinates is left to the subclass. - Since:
- 1.2
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classLine2D.DoubleA line segment specified with double coordinates.static classLine2D.FloatA line segment specified with float coordinates.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedLine2D()This is an abstract class that cannot be instantiated directly.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectclone()Creates a new object of the same class as this object.booleancontains(double x, double y)Tests if a specified coordinate is inside the boundary of thisLine2D.booleancontains(double x, double y, double w, double h)Tests if the interior of thisLine2Dentirely contains the specified set of rectangular coordinates.booleancontains(Point2D p)Tests if a givenPoint2Dis inside the boundary of thisLine2D.booleancontains(Rectangle2D r)Tests if the interior of thisLine2Dentirely contains the specifiedRectangle2D.RectanglegetBounds()Returns an integerRectanglethat completely encloses theShape.abstract Point2DgetP1()Returns the startPoint2Dof thisLine2D.abstract Point2DgetP2()Returns the endPoint2Dof thisLine2D.PathIteratorgetPathIterator(AffineTransform at)Returns an iteration object that defines the boundary of thisLine2D.PathIteratorgetPathIterator(AffineTransform at, double flatness)Returns an iteration object that defines the boundary of this flattenedLine2D.abstract doublegetX1()Returns the X coordinate of the start point in double precision.abstract doublegetX2()Returns the X coordinate of the end point in double precision.abstract doublegetY1()Returns the Y coordinate of the start point in double precision.abstract doublegetY2()Returns the Y coordinate of the end point in double precision.booleanintersects(double x, double y, double w, double h)Tests if the interior of theShapeintersects the interior of a specified rectangular area.booleanintersects(Rectangle2D r)Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D.booleanintersectsLine(double x1, double y1, double x2, double y2)Tests if the line segment from(x1,y1)to(x2,y2)intersects this line segment.booleanintersectsLine(Line2D l)Tests if the specified line segment intersects this line segment.static booleanlinesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)Tests if the line segment from(x1,y1)to(x2,y2)intersects the line segment from(x3,y3)to(x4,y4).doubleptLineDist(double px, double py)Returns the distance from a point to this line.static doubleptLineDist(double x1, double y1, double x2, double y2, double px, double py)Returns the distance from a point to a line.doubleptLineDist(Point2D pt)Returns the distance from aPoint2Dto this line.doubleptLineDistSq(double px, double py)Returns the square of the distance from a point to this line.static doubleptLineDistSq(double x1, double y1, double x2, double y2, double px, double py)Returns the square of the distance from a point to a line.doubleptLineDistSq(Point2D pt)Returns the square of the distance from a specifiedPoint2Dto this line.doubleptSegDist(double px, double py)Returns the distance from a point to this line segment.static doubleptSegDist(double x1, double y1, double x2, double y2, double px, double py)Returns the distance from a point to a line segment.doubleptSegDist(Point2D pt)Returns the distance from aPoint2Dto this line segment.doubleptSegDistSq(double px, double py)Returns the square of the distance from a point to this line segment.static doubleptSegDistSq(double x1, double y1, double x2, double y2, double px, double py)Returns the square of the distance from a point to a line segment.doubleptSegDistSq(Point2D pt)Returns the square of the distance from aPoint2Dto this line segment.intrelativeCCW(double px, double py)Returns an indicator of where the specified point(px,py)lies with respect to this line segment.static intrelativeCCW(double x1, double y1, double x2, double y2, double px, double py)Returns an indicator of where the specified point(px,py)lies with respect to the line segment from(x1,y1)to(x2,y2).intrelativeCCW(Point2D p)Returns an indicator of where the specifiedPoint2Dlies with respect to this line segment.abstract voidsetLine(double x1, double y1, double x2, double y2)Sets the location of the end points of thisLine2Dto the specified double coordinates.voidsetLine(Line2D l)Sets the location of the end points of thisLine2Dto the same as those end points of the specifiedLine2D.voidsetLine(Point2D p1, Point2D p2)Sets the location of the end points of thisLine2Dto the specifiedPoint2Dcoordinates.- 
Methods declared in class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods declared in interface java.awt.ShapegetBounds2D
 
- 
 
- 
- 
- 
Constructor Detail- 
Line2Dprotected Line2D() This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessory methods below.- Since:
- 1.2
- See Also:
- Line2D.Float,- Line2D.Double
 
 
- 
 - 
Method Detail- 
getX1public abstract double getX1() Returns the X coordinate of the start point in double precision.- Returns:
- the X coordinate of the start point of this
         Line2Dobject.
- Since:
- 1.2
 
 - 
getY1public abstract double getY1() Returns the Y coordinate of the start point in double precision.- Returns:
- the Y coordinate of the start point of this
         Line2Dobject.
- Since:
- 1.2
 
 - 
getP1public abstract Point2D getP1() Returns the startPoint2Dof thisLine2D.- Returns:
- the start Point2Dof thisLine2D.
- Since:
- 1.2
 
 - 
getX2public abstract double getX2() Returns the X coordinate of the end point in double precision.- Returns:
- the X coordinate of the end point of this
         Line2Dobject.
- Since:
- 1.2
 
 - 
getY2public abstract double getY2() Returns the Y coordinate of the end point in double precision.- Returns:
- the Y coordinate of the end point of this
         Line2Dobject.
- Since:
- 1.2
 
 - 
getP2public abstract Point2D getP2() Returns the endPoint2Dof thisLine2D.- Returns:
- the end Point2Dof thisLine2D.
- Since:
- 1.2
 
 - 
setLinepublic abstract void setLine(double x1, double y1, double x2, double y2)Sets the location of the end points of thisLine2Dto the specified double coordinates.- Parameters:
- x1- the X coordinate of the start point
- y1- the Y coordinate of the start point
- x2- the X coordinate of the end point
- y2- the Y coordinate of the end point
- Since:
- 1.2
 
 - 
setLinepublic void setLine(Point2D p1, Point2D p2) Sets the location of the end points of thisLine2Dto the specifiedPoint2Dcoordinates.- Parameters:
- p1- the start- Point2Dof the line segment
- p2- the end- Point2Dof the line segment
- Since:
- 1.2
 
 - 
setLinepublic void setLine(Line2D l) Sets the location of the end points of thisLine2Dto the same as those end points of the specifiedLine2D.- Parameters:
- l- the specified- Line2D
- Since:
- 1.2
 
 - 
relativeCCWpublic static int relativeCCW(double x1, double y1, double x2, double y2, double px, double py)Returns an indicator of where the specified point(px,py)lies with respect to the line segment from(x1,y1)to(x2,y2). The return value can be either 1, -1, or 0 and indicates in which direction the specified line must pivot around its first end point,(x1,y1), in order to point at the specified point(px,py).A return value of 1 indicates that the line segment must turn in the direction that takes the positive X axis towards the negative Y axis. In the default coordinate system used by Java 2D, this direction is counterclockwise. A return value of -1 indicates that the line segment must turn in the direction that takes the positive X axis towards the positive Y axis. In the default coordinate system, this direction is clockwise. A return value of 0 indicates that the point lies exactly on the line segment. Note that an indicator value of 0 is rare and not useful for determining collinearity because of floating point rounding issues. If the point is colinear with the line segment, but not between the end points, then the value will be -1 if the point lies "beyond (x1,y1)" or 1 if the point lies "beyond(x2,y2)".- Parameters:
- x1- the X coordinate of the start point of the specified line segment
- y1- the Y coordinate of the start point of the specified line segment
- x2- the X coordinate of the end point of the specified line segment
- y2- the Y coordinate of the end point of the specified line segment
- px- the X coordinate of the specified point to be compared with the specified line segment
- py- the Y coordinate of the specified point to be compared with the specified line segment
- Returns:
- an integer that indicates the position of the third specified coordinates with respect to the line segment formed by the first two specified coordinates.
- Since:
- 1.2
 
 - 
relativeCCWpublic int relativeCCW(double px, double py)Returns an indicator of where the specified point(px,py)lies with respect to this line segment. See the method comments ofrelativeCCW(double, double, double, double, double, double)to interpret the return value.- Parameters:
- px- the X coordinate of the specified point to be compared with this- Line2D
- py- the Y coordinate of the specified point to be compared with this- Line2D
- Returns:
- an integer that indicates the position of the specified
         coordinates with respect to this Line2D
- Since:
- 1.2
- See Also:
- relativeCCW(double, double, double, double, double, double)
 
 - 
relativeCCWpublic int relativeCCW(Point2D p) Returns an indicator of where the specifiedPoint2Dlies with respect to this line segment. See the method comments ofrelativeCCW(double, double, double, double, double, double)to interpret the return value.- Parameters:
- p- the specified- Point2Dto be compared with this- Line2D
- Returns:
- an integer that indicates the position of the specified
         Point2Dwith respect to thisLine2D
- Since:
- 1.2
- See Also:
- relativeCCW(double, double, double, double, double, double)
 
 - 
linesIntersectpublic static boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)Tests if the line segment from(x1,y1)to(x2,y2)intersects the line segment from(x3,y3)to(x4,y4).- Parameters:
- x1- the X coordinate of the start point of the first specified line segment
- y1- the Y coordinate of the start point of the first specified line segment
- x2- the X coordinate of the end point of the first specified line segment
- y2- the Y coordinate of the end point of the first specified line segment
- x3- the X coordinate of the start point of the second specified line segment
- y3- the Y coordinate of the start point of the second specified line segment
- x4- the X coordinate of the end point of the second specified line segment
- y4- the Y coordinate of the end point of the second specified line segment
- Returns:
- trueif the first specified line segment and the second specified line segment intersect each other;- falseotherwise.
- Since:
- 1.2
 
 - 
intersectsLinepublic boolean intersectsLine(double x1, double y1, double x2, double y2)Tests if the line segment from(x1,y1)to(x2,y2)intersects this line segment.- Parameters:
- x1- the X coordinate of the start point of the specified line segment
- y1- the Y coordinate of the start point of the specified line segment
- x2- the X coordinate of the end point of the specified line segment
- y2- the Y coordinate of the end point of the specified line segment
- Returns:
- trueif this line segment and the specified line segment intersect each other;- falseotherwise.
- Since:
- 1.2
 
 - 
intersectsLinepublic boolean intersectsLine(Line2D l) Tests if the specified line segment intersects this line segment.- Parameters:
- l- the specified- Line2D
- Returns:
- trueif this line segment and the specified line segment intersect each other;- falseotherwise.
- Since:
- 1.2
 
 - 
ptSegDistSqpublic static double ptSegDistSq(double x1, double y1, double x2, double y2, double px, double py)Returns the square of the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- x1- the X coordinate of the start point of the specified line segment
- y1- the Y coordinate of the start point of the specified line segment
- x2- the X coordinate of the end point of the specified line segment
- y2- the Y coordinate of the end point of the specified line segment
- px- the X coordinate of the specified point being measured against the specified line segment
- py- the Y coordinate of the specified point being measured against the specified line segment
- Returns:
- a double value that is the square of the distance from the specified point to the specified line segment.
- Since:
- 1.2
- See Also:
- ptLineDistSq(double, double, double, double, double, double)
 
 - 
ptSegDistpublic static double ptSegDist(double x1, double y1, double x2, double y2, double px, double py)Returns the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- x1- the X coordinate of the start point of the specified line segment
- y1- the Y coordinate of the start point of the specified line segment
- x2- the X coordinate of the end point of the specified line segment
- y2- the Y coordinate of the end point of the specified line segment
- px- the X coordinate of the specified point being measured against the specified line segment
- py- the Y coordinate of the specified point being measured against the specified line segment
- Returns:
- a double value that is the distance from the specified point to the specified line segment.
- Since:
- 1.2
- See Also:
- ptLineDist(double, double, double, double, double, double)
 
 - 
ptSegDistSqpublic double ptSegDistSq(double px, double py)Returns the square of the distance from a point to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- px- the X coordinate of the specified point being measured against this line segment
- py- the Y coordinate of the specified point being measured against this line segment
- Returns:
- a double value that is the square of the distance from the specified point to the current line segment.
- Since:
- 1.2
- See Also:
- ptLineDistSq(double, double)
 
 - 
ptSegDistSqpublic double ptSegDistSq(Point2D pt) Returns the square of the distance from aPoint2Dto this line segment. The distance measured is the distance between the specified point and the closest point between the current line's end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- pt- the specified- Point2Dbeing measured against this line segment.
- Returns:
- a double value that is the square of the distance from the
                  specified Point2Dto the current line segment.
- Since:
- 1.2
- See Also:
- ptLineDistSq(Point2D)
 
 - 
ptSegDistpublic double ptSegDist(double px, double py)Returns the distance from a point to this line segment. The distance measured is the distance between the specified point and the closest point between the current line's end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- px- the X coordinate of the specified point being measured against this line segment
- py- the Y coordinate of the specified point being measured against this line segment
- Returns:
- a double value that is the distance from the specified point to the current line segment.
- Since:
- 1.2
- See Also:
- ptLineDist(double, double)
 
 - 
ptSegDistpublic double ptSegDist(Point2D pt) Returns the distance from aPoint2Dto this line segment. The distance measured is the distance between the specified point and the closest point between the current line's end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.- Parameters:
- pt- the specified- Point2Dbeing measured against this line segment
- Returns:
- a double value that is the distance from the specified
                          Point2Dto the current line segment.
- Since:
- 1.2
- See Also:
- ptLineDist(Point2D)
 
 - 
ptLineDistSqpublic static double ptLineDistSq(double x1, double y1, double x2, double y2, double px, double py)Returns the square of the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.- Parameters:
- x1- the X coordinate of the start point of the specified line
- y1- the Y coordinate of the start point of the specified line
- x2- the X coordinate of the end point of the specified line
- y2- the Y coordinate of the end point of the specified line
- px- the X coordinate of the specified point being measured against the specified line
- py- the Y coordinate of the specified point being measured against the specified line
- Returns:
- a double value that is the square of the distance from the specified point to the specified line.
- Since:
- 1.2
- See Also:
- ptSegDistSq(double, double, double, double, double, double)
 
 - 
ptLineDistpublic static double ptLineDist(double x1, double y1, double x2, double y2, double px, double py)Returns the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.- Parameters:
- x1- the X coordinate of the start point of the specified line
- y1- the Y coordinate of the start point of the specified line
- x2- the X coordinate of the end point of the specified line
- y2- the Y coordinate of the end point of the specified line
- px- the X coordinate of the specified point being measured against the specified line
- py- the Y coordinate of the specified point being measured against the specified line
- Returns:
- a double value that is the distance from the specified point to the specified line.
- Since:
- 1.2
- See Also:
- ptSegDist(double, double, double, double, double, double)
 
 - 
ptLineDistSqpublic double ptLineDistSq(double px, double py)Returns the square of the distance from a point to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by thisLine2D. If the specified point intersects the line, this method returns 0.0.- Parameters:
- px- the X coordinate of the specified point being measured against this line
- py- the Y coordinate of the specified point being measured against this line
- Returns:
- a double value that is the square of the distance from a specified point to the current line.
- Since:
- 1.2
- See Also:
- ptSegDistSq(double, double)
 
 - 
ptLineDistSqpublic double ptLineDistSq(Point2D pt) Returns the square of the distance from a specifiedPoint2Dto this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by thisLine2D. If the specified point intersects the line, this method returns 0.0.- Parameters:
- pt- the specified- Point2Dbeing measured against this line
- Returns:
- a double value that is the square of the distance from a
                  specified Point2Dto the current line.
- Since:
- 1.2
- See Also:
- ptSegDistSq(Point2D)
 
 - 
ptLineDistpublic double ptLineDist(double px, double py)Returns the distance from a point to this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by thisLine2D. If the specified point intersects the line, this method returns 0.0.- Parameters:
- px- the X coordinate of the specified point being measured against this line
- py- the Y coordinate of the specified point being measured against this line
- Returns:
- a double value that is the distance from a specified point to the current line.
- Since:
- 1.2
- See Also:
- ptSegDist(double, double)
 
 - 
ptLineDistpublic double ptLineDist(Point2D pt) Returns the distance from aPoint2Dto this line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by thisLine2D. If the specified point intersects the line, this method returns 0.0.- Parameters:
- pt- the specified- Point2Dbeing measured
- Returns:
- a double value that is the distance from a specified
                  Point2Dto the current line.
- Since:
- 1.2
- See Also:
- ptSegDist(Point2D)
 
 - 
containspublic boolean contains(double x, double y)Tests if a specified coordinate is inside the boundary of thisLine2D. This method is required to implement theShapeinterface, but in the case ofLine2Dobjects it always returnsfalsesince a line contains no area.
 - 
containspublic boolean contains(Point2D p) Tests if a givenPoint2Dis inside the boundary of thisLine2D. This method is required to implement theShapeinterface, but in the case ofLine2Dobjects it always returnsfalsesince a line contains no area.
 - 
intersectspublic boolean intersects(double x, double y, double w, double h)Tests if the interior of theShapeintersects the interior of a specified rectangular area. The rectangular area is considered to intersect theShapeif any point is contained in both the interior of theShapeand the specified rectangular area.The Shape.intersects()method allows aShapeimplementation to conservatively returntruewhen:- 
 there is a high probability that the rectangular area and the
 Shapeintersect, but
- the calculations to accurately determine this intersection are prohibitively expensive.
 Shapesthis method might returntrueeven though the rectangular area does not intersect theShape. TheAreaclass performs more accurate computations of geometric intersection than mostShapeobjects and therefore can be used if a more precise answer is required.- Specified by:
- intersectsin interface- Shape
- Parameters:
- x- the X coordinate of the upper-left corner of the specified rectangular area
- y- the Y coordinate of the upper-left corner of the specified rectangular area
- w- the width of the specified rectangular area
- h- the height of the specified rectangular area
- Returns:
- trueif the interior of the- Shapeand the interior of the rectangular area intersect, or are both highly likely to intersect and intersection calculations would be too expensive to perform;- falseotherwise.
- Since:
- 1.2
- See Also:
- Area
 
- 
 there is a high probability that the rectangular area and the
 
 - 
intersectspublic boolean intersects(Rectangle2D r) Tests if the interior of theShapeintersects the interior of a specifiedRectangle2D. TheShape.intersects()method allows aShapeimplementation to conservatively returntruewhen:- 
 there is a high probability that the Rectangle2Dand theShapeintersect, but
- the calculations to accurately determine this intersection are prohibitively expensive.
 Shapesthis method might returntrueeven though theRectangle2Ddoes not intersect theShape. TheAreaclass performs more accurate computations of geometric intersection than mostShapeobjects and therefore can be used if a more precise answer is required.- Specified by:
- intersectsin interface- Shape
- Parameters:
- r- the specified- Rectangle2D
- Returns:
- trueif the interior of the- Shapeand the interior of the specified- Rectangle2Dintersect, or are both highly likely to intersect and intersection calculations would be too expensive to perform;- falseotherwise.
- Since:
- 1.2
- See Also:
- Shape.intersects(double, double, double, double)
 
- 
 there is a high probability that the 
 - 
containspublic boolean contains(double x, double y, double w, double h)Tests if the interior of thisLine2Dentirely contains the specified set of rectangular coordinates. This method is required to implement theShapeinterface, but in the case ofLine2Dobjects it always returns false since a line contains no area.- Specified by:
- containsin interface- Shape
- Parameters:
- x- the X coordinate of the upper-left corner of the specified rectangular area
- y- the Y coordinate of the upper-left corner of the specified rectangular area
- w- the width of the specified rectangular area
- h- the height of the specified rectangular area
- Returns:
- falsebecause a- Line2Dcontains no area.
- Since:
- 1.2
- See Also:
- Area,- Shape.intersects(double, double, double, double)
 
 - 
containspublic boolean contains(Rectangle2D r) Tests if the interior of thisLine2Dentirely contains the specifiedRectangle2D. This method is required to implement theShapeinterface, but in the case ofLine2Dobjects it always returnsfalsesince a line contains no area.- Specified by:
- containsin interface- Shape
- Parameters:
- r- the specified- Rectangle2Dto be tested
- Returns:
- falsebecause a- Line2Dcontains no area.
- Since:
- 1.2
- See Also:
- Shape.contains(double, double, double, double)
 
 - 
getBoundspublic Rectangle getBounds() Returns an integerRectanglethat completely encloses theShape. Note that there is no guarantee that the returnedRectangleis the smallest bounding box that encloses theShape, only that theShapelies entirely within the indicatedRectangle. The returnedRectanglemight also fail to completely enclose theShapeif theShapeoverflows the limited range of the integer data type. ThegetBounds2Dmethod generally returns a tighter bounding box due to its greater flexibility in representation.Note that the definition of insideness can lead to situations where points on the defining outline of the shapemay not be considered contained in the returnedboundsobject, but only in cases where those points are also not considered contained in the originalshape.If a pointis inside theshapeaccording to thecontains(point)method, then it must be inside the returnedRectanglebounds object according to thecontains(point)method of thebounds. Specifically:shape.contains(x,y)requiresbounds.contains(x,y)If a pointis not inside theshape, then it might still be contained in theboundsobject:bounds.contains(x,y)does not implyshape.contains(x,y)- Specified by:
- getBoundsin interface- Shape
- Returns:
- an integer Rectanglethat completely encloses theShape.
- Since:
- 1.2
- See Also:
- Shape.getBounds2D()
 
 - 
getPathIteratorpublic PathIterator getPathIterator(AffineTransform at) Returns an iteration object that defines the boundary of thisLine2D. The iterator for this class is not multi-threaded safe, which means that thisLine2Dclass does not guarantee that modifications to the geometry of thisLine2Dobject do not affect any iterations of that geometry that are already in process.- Specified by:
- getPathIteratorin interface- Shape
- Parameters:
- at- the specified- AffineTransform
- Returns:
- a PathIteratorthat defines the boundary of thisLine2D.
- Since:
- 1.2
 
 - 
getPathIteratorpublic PathIterator getPathIterator(AffineTransform at, double flatness) Returns an iteration object that defines the boundary of this flattenedLine2D. The iterator for this class is not multi-threaded safe, which means that thisLine2Dclass does not guarantee that modifications to the geometry of thisLine2Dobject do not affect any iterations of that geometry that are already in process.- Specified by:
- getPathIteratorin interface- Shape
- Parameters:
- at- the specified- AffineTransform
- flatness- the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the end points. Since a- Line2Dobject is always flat, this parameter is ignored.
- Returns:
- a PathIteratorthat defines the boundary of the flattenedLine2D
- Since:
- 1.2
 
 - 
clonepublic Object clone() Creates a new object of the same class as this object.- Overrides:
- clonein class- Object
- Returns:
- a clone of this instance.
- Throws:
- OutOfMemoryError- if there is not enough memory.
- Since:
- 1.2
- See Also:
- Cloneable
 
 
- 
 
-