public final class GreatArcPath extends Object implements BoundarySource2S
GreatArc
instances.Modifier and Type | Class and Description |
---|---|
static class |
GreatArcPath.Builder
Class used to build arc paths.
|
Modifier and Type | Method and Description |
---|---|
Stream<GreatArc> |
boundaryStream() |
static GreatArcPath.Builder |
builder(Precision.DoubleEquivalence precision)
Return a
GreatArcPath.Builder instance configured with the given precision
context. |
static GreatArcPath |
empty()
Get an instance containing no arcs.
|
static GreatArcPath |
fromArcs(Collection<GreatArc> arcs)
Construct a new path from the given arcs.
|
static GreatArcPath |
fromArcs(GreatArc... arcs)
Construct a new path from the given arcs.
|
static GreatArcPath |
fromVertexLoop(Collection<Point2S> vertices,
Precision.DoubleEquivalence precision)
Return a new path formed by connecting the given vertices.
|
static GreatArcPath |
fromVertices(Collection<Point2S> vertices,
boolean close,
Precision.DoubleEquivalence precision)
Return a new path formed by connecting the given vertices.
|
static GreatArcPath |
fromVertices(Collection<Point2S> vertices,
Precision.DoubleEquivalence precision)
Return a new path formed by connecting the given vertices.
|
List<GreatArc> |
getArcs()
Get the arcs in path.
|
GreatArc |
getEndArc()
Get the end arc for the path or null if the path is empty.
|
Point2S |
getEndVertex()
Get the end vertex for the path or null if the path is empty
or consists of a single, full arc.
|
GreatArc |
getStartArc()
Get the start arc for the path or null if the path is empty.
|
Point2S |
getStartVertex()
Get the start vertex for the path or null if the path is empty
or consists of a single, full arc.
|
List<Point2S> |
getVertices()
Get the vertices contained in the path in the order they appear.
|
boolean |
isClosed()
Return true if the path is closed, meaning that the end
point for the last arc is equal to the start point
for the path.
|
boolean |
isEmpty()
Return true if the path does not contain any arcs.
|
String |
toString()
Return a string representation of this arc path instance.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
of, of, toList, toTree
public Stream<GreatArc> boundaryStream()
boundaryStream
in interface BoundarySource<GreatArc>
public GreatArc getStartArc()
public GreatArc getEndArc()
public Point2S getStartVertex()
public Point2S getEndVertex()
public List<Point2S> getVertices()
public boolean isEmpty()
public boolean isClosed()
public String toString()
In order to keep the string representation short but useful, the exact format of the return value depends on the properties of the path. See below for examples.
GreatArcPath[empty= true]
GreatArcPath[full= true, circle= GreatCircle[pole= (0.0, 0.0, 1.0),
x= (0.0, 1.0, -0.0), y= (-1.0, 0.0, 0.0)]]
GreatArcPath[vertices= [(0.0, 1.5707963267948966),
(1.5707963267948966, 1.5707963267948966)]]
public static GreatArcPath fromArcs(GreatArc... arcs)
arcs
- arc instance to use to construct the pathpublic static GreatArcPath fromArcs(Collection<GreatArc> arcs)
arcs
- arc instance to use to construct the pathpublic static GreatArcPath fromVertexLoop(Collection<Point2S> vertices, Precision.DoubleEquivalence precision)
fromPoints(points, true, precision)
.vertices
- the points to construct the path fromprecision
- precision precision context used to construct the arc instances for the
pathfromVertices(Collection, boolean, Precision.DoubleEquivalence)
public static GreatArcPath fromVertices(Collection<Point2S> vertices, Precision.DoubleEquivalence precision)
fromPoint(points, false, precision)
.vertices
- the points to construct the path fromprecision
- precision context used to construct the arc instances for the
pathfromVertices(Collection, boolean, Precision.DoubleEquivalence)
public static GreatArcPath fromVertices(Collection<Point2S> vertices, boolean close, Precision.DoubleEquivalence precision)
vertices
- the points to construct the path fromclose
- if true, then an additional arc will be added from the last point
to the first, if the points are not already considered equal by the given
precision contextprecision
- precision context used to construct the arc instances for the
pathpublic static GreatArcPath.Builder builder(Precision.DoubleEquivalence precision)
GreatArcPath.Builder
instance configured with the given precision
context. The precision context is used when building arcs from points
and may be omitted if raw points are not used.precision
- precision context to use when building arcs from
raw points; may be null if raw points are not used.GreatArcPath.Builder
instancepublic static GreatArcPath empty()
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.