com.vividsolutions.jts.geom
Class CoordinateList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
com.vividsolutions.jts.geom.CoordinateList
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable
- public class CoordinateList
- extends java.util.ArrayList
A list of Coordinates
, which may
be set to prevent repeated coordinates from occuring in the list.
- Version:
- 1.4.0
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary |
CoordinateList()
|
CoordinateList(Coordinate[] coord)
The basic constructor for a CoordinateArray allows repeated points
(i.e produces a CoordinateList with exactly the same set of points) |
CoordinateList(Coordinate[] coord,
boolean allowRepeated)
Constructs a new list from an array of Coordinates,
allowing caller to specify if repeated points are to be removed. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
CoordinateList
public CoordinateList()
CoordinateList
public CoordinateList(Coordinate[] coord)
- The basic constructor for a CoordinateArray allows repeated points
(i.e produces a CoordinateList with exactly the same set of points)
CoordinateList
public CoordinateList(Coordinate[] coord,
boolean allowRepeated)
- Constructs a new list from an array of Coordinates,
allowing caller to specify if repeated points are to be removed.
- Parameters:
coord
- the array of coordinates to load into the listallowRepeated
- if false
, repeated points are removed
getCoordinate
public Coordinate getCoordinate(int i)
add
public boolean add(Coordinate[] coord,
boolean allowRepeated,
boolean direction)
add
public boolean add(Coordinate[] coord,
boolean allowRepeated)
add
public boolean add(java.lang.Object obj,
boolean allowRepeated)
add
public void add(Coordinate coord,
boolean allowRepeated)
addAll
public boolean addAll(java.util.Collection coll,
boolean allowRepeated)
closeRing
public void closeRing()
- Ensure this coordList is a ring, by adding the start point if necessary
toCoordinateArray
public Coordinate[] toCoordinateArray()