public static final class GreatArcPath.Builder extends Object
Modifier and Type | Method and Description |
---|---|
GreatArcPath.Builder |
append(GreatArc arc)
Append an arc to the end of the path.
|
GreatArcPath.Builder |
append(Point2S vertex)
Add a vertex to the end of this path.
|
GreatArcPath.Builder |
appendVertices(Collection<Point2S> vertices)
Convenience method for appending a collection of vertices to the path in a single
method call.
|
GreatArcPath.Builder |
appendVertices(Point2S... vertices)
Convenience method for appending multiple vertices to the path at once.
|
GreatArcPath |
build()
Build a
GreatArcPath instance from the configured path. |
GreatArcPath |
build(boolean close)
Build a
GreatArcPath instance from the configured path. |
GreatArcPath |
close()
Close the current path and build a new
GreatArcPath instance. |
GreatArc |
getEndArc()
Get the arc at the end of the path or null if it does not exist.
|
GreatArc |
getStartArc()
Get the arc at the start of the path or null if it does not exist.
|
GreatArcPath.Builder |
prepend(GreatArc arc)
Prepend an arc to the beginning of the path.
|
GreatArcPath.Builder |
prepend(Point2S vertex)
Add a vertex to the front of this path.
|
GreatArcPath.Builder |
prependPoints(Collection<Point2S> vertices)
Convenience method for prepending a collection of vertices to the path in a single method call.
|
GreatArcPath.Builder |
prependPoints(Point2S... vertices)
Convenience method for prepending multiple vertices to the path in a single method call.
|
GreatArcPath.Builder |
setPrecision(Precision.DoubleEquivalence builderPrecision)
Set the precision context.
|
public GreatArcPath.Builder setPrecision(Precision.DoubleEquivalence builderPrecision)
GreatArc
instances since those contain their own precision contexts.builderPrecision
- precision context to use when creating arcs from pointspublic GreatArc getStartArc()
public GreatArc getEndArc()
public GreatArcPath.Builder append(GreatArc arc)
arc
- arc to append to the pathIllegalStateException
- if the path contains a previous arc
and the end point of the previous arc is not equivalent to the
start point of the given arcpublic GreatArcPath.Builder append(Point2S vertex)
vertex
- the vertex to addsetPrecision(Precision.DoubleEquivalence)
public GreatArcPath.Builder appendVertices(Collection<Point2S> vertices)
vertices
- the vertices to appendappend(Point2S)
public GreatArcPath.Builder appendVertices(Point2S... vertices)
vertices
- the points to appendappend(Point2S)
public GreatArcPath.Builder prepend(GreatArc arc)
arc
- arc to prepend to the pathIllegalStateException
- if the path contains a start arc
and the end point of the given arc is not equivalent to the
start point of the start arcpublic GreatArcPath.Builder prepend(Point2S vertex)
vertex
- the vertex to addsetPrecision(Precision.DoubleEquivalence)
public GreatArcPath.Builder prependPoints(Collection<Point2S> vertices)
prepend(Point2S)
method in reverse order.vertices
- the points to prependprepend(Point2S)
public GreatArcPath.Builder prependPoints(Point2S... vertices)
prepend(Point2S)
method in reverse order.vertices
- the vertices to prependprepend(Point2S)
public GreatArcPath close()
GreatArcPath
instance. This method is equivalent
to builder.build(true)
.public GreatArcPath build()
GreatArcPath
instance from the configured path. This method is equivalent
to builder.build(false)
.public GreatArcPath build(boolean close)
GreatArcPath
instance from the configured path.close
- if true, the path will be closed by adding an end point equivalent to the
start pointCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.