public interface PositionSequence<P extends Position> extends Iterable<P>
PositionSequence
is an ordered sequence of Position
s.
A PositionSequence
is typically used to store the Position
s (vertices) that define a
curve (a 1-dimensional geometric primitive), with the subtype of the curve specifying the form of interpolation between
consecutive Position
s. (E.g.a LineString
uses linear interpolation between Position
s.)
Modifier and Type | Method and Description |
---|---|
void |
accept(LLAPositionVisitor visitor)
Accepts a
LLAPositionVisitor . |
void |
accept(PositionVisitor<P> visitor)
Accepts a
PositionVisitor . |
PositionSequence<P> |
clone() |
int |
getCoordinateDimension()
Returns the coordinate dimension of this
PositionSequence . |
void |
getCoordinates(int position,
double[] coordinates)
Copies the coordinates at position i into the specified array.
|
Class<P> |
getPositionClass() |
PositionFactory<P> |
getPositionFactory() |
P |
getPositionN(int index) |
boolean |
isEmpty()
Returns true iff this
PositionSequence contains no Position s |
PositionSequence<P> |
reverse()
Creates a new
PositionSequence with positions in reverse order. |
int |
size()
Returns the number of
Position s contained in this PositionSequence . |
forEach, iterator, spliterator
PositionSequence<P> clone()
PositionFactory<P> getPositionFactory()
boolean isEmpty()
PositionSequence
contains no Position
sPositionSequence
contains no Position
sint getCoordinateDimension()
PositionSequence
.
The coordinate dimension is number of measurements or axes needed to describe Position
in the coordinate system associated with this PositionSequence
.
PositionSequence
int size()
Position
s contained in this PositionSequence
.Position
s contained in this PositionSequence
.void getCoordinates(int position, double[] coordinates)
position
- the position index to copycoordinates
- the destination arrayIllegalArgumentException
- if the destination array is smaller than the coordiante dimension.P getPositionN(int index)
void accept(PositionVisitor<P> visitor)
PositionVisitor
.
This instance will pass the visitor to all of its Position
s.
visitor
- the visitor for this instance's Position
svoid accept(LLAPositionVisitor visitor)
LLAPositionVisitor
.visitor
- PositionSequence<P> reverse()
PositionSequence
with positions in reverse order.Copyright © 2019 geolatte.org. All rights reserved.