Package org.locationtech.jtsexample.geom
Class ExtendedCoordinateSequenceFactory
- java.lang.Object
-
- org.locationtech.jtsexample.geom.ExtendedCoordinateSequenceFactory
-
- All Implemented Interfaces:
CoordinateSequenceFactory
public class ExtendedCoordinateSequenceFactory extends java.lang.Object implements CoordinateSequenceFactory
Creates ExtendedCoordinateSequenceFactory internally represented as an array ofExtendedCoordinate
s.- Version:
- 1.7
-
-
Field Summary
Fields Modifier and Type Field Description private static ExtendedCoordinateSequenceFactory
instance
-
Constructor Summary
Constructors Modifier Constructor Description private
ExtendedCoordinateSequenceFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CoordinateSequence
create(int size, int dimension)
Creates aCoordinateSequence
of the specified size and dimension.CoordinateSequence
create(Coordinate[] coordinates)
Returns an ExtendedCoordinateSequence based on the given array -- the array is used directly if it is an instance of ExtendedCoordinate[]; otherwise it is copied.CoordinateSequence
create(CoordinateSequence coordSeq)
Creates aCoordinateSequence
which is a copy of the givenCoordinateSequence
.static ExtendedCoordinateSequenceFactory
instance()
Returns the singleton instance of ExtendedCoordinateSequenceFactory
-
-
-
Field Detail
-
instance
private static ExtendedCoordinateSequenceFactory instance
-
-
Method Detail
-
instance
public static ExtendedCoordinateSequenceFactory instance()
Returns the singleton instance of ExtendedCoordinateSequenceFactory
-
create
public CoordinateSequence create(Coordinate[] coordinates)
Returns an ExtendedCoordinateSequence based on the given array -- the array is used directly if it is an instance of ExtendedCoordinate[]; otherwise it is copied.- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
coordinates
- the coordinates
-
create
public CoordinateSequence create(CoordinateSequence coordSeq)
Description copied from interface:CoordinateSequenceFactory
Creates aCoordinateSequence
which is a copy of the givenCoordinateSequence
. This method must handle null arguments by creating an empty sequence.- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
coordSeq
- the coordinate sequence to copy
-
create
public CoordinateSequence create(int size, int dimension)
Description copied from interface:CoordinateSequenceFactory
Creates aCoordinateSequence
of the specified size and dimension. For this to be useful, theCoordinateSequence
implementation must be mutable.If the requested dimension is larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- Specified by:
create
in interfaceCoordinateSequenceFactory
- Parameters:
size
- the number of coordinates in the sequencedimension
- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)- See Also:
CoordinateSequenceFactory.create(int, int)
-
-