Class LinePath.SimplifiedLinePath
- java.lang.Object
-
- org.apache.commons.geometry.euclidean.twod.path.LinePath
-
- org.apache.commons.geometry.euclidean.twod.path.LinePath.SimplifiedLinePath
-
- All Implemented Interfaces:
BoundarySource<LineConvexSubset>
,Sized
,BoundarySource2D
,Linecastable2D
- Enclosing class:
- LinePath
private static final class LinePath.SimplifiedLinePath extends LinePath
Internal class returned when a line path is simplified to remove unnecessary line subset divisions. Thesimplify()
method on this class simply returns the same instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.geometry.euclidean.twod.path.LinePath
LinePath.Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SimplifiedLinePath(java.util.List<LineConvexSubset> elements)
Create a new instance containing the given line subsets.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinePath.SimplifiedLinePath
simplify()
Simplify this path, if possible, by combining adjacent elements that lie on the same line (as determined byLine.equals(Object)
).-
Methods inherited from class org.apache.commons.geometry.euclidean.twod.path.LinePath
boundaryStream, builder, empty, from, from, fromVertexLoop, fromVertices, fromVertices, getElements, getEnd, getSize, getStart, getVertexSequence, isClosed, isEmpty, isFinite, isInfinite, reverse, toString, transform
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.geometry.euclidean.twod.BoundarySource2D
getBounds, linecast, linecastFirst, toList, toTree
-
Methods inherited from interface org.apache.commons.geometry.euclidean.twod.Linecastable2D
linecast, linecastFirst
-
-
-
-
Constructor Detail
-
SimplifiedLinePath
private SimplifiedLinePath(java.util.List<LineConvexSubset> elements)
Create a new instance containing the given line subsets. No validation is performed on the inputs. Caller must ensure that the given line subsets represent a valid, simplified path.- Parameters:
elements
- line subsets comprising the path
-
-
Method Detail
-
simplify
public LinePath.SimplifiedLinePath simplify()
Simplify this path, if possible, by combining adjacent elements that lie on the same line (as determined byLine.equals(Object)
).
-
-