Class PositionList
- java.lang.Object
-
- com.rometools.modules.georss.geometries.PositionList
-
- All Implemented Interfaces:
Serializable,Cloneable
public class PositionList extends Object implements Cloneable, Serializable
A list of geographic positions, latitude, longitude decimal degrees WGS84- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PositionList()Creates a new empty instance of PositionList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double latitude, double longitude)Add a position at the end of the listObjectclone()booleanequals(Object obj)doublegetLatitude(int pos)doublegetLongitude(int pos)voidinsert(int pos, double latitude, double longitude)Add a position at a given index in the list.voidremove(int pos)Remove the position at the index, the rest of the list is shifted one place to the "left"voidreplace(int pos, double latitude, double longitude)Replace the position at the index with new valuesintsize()
-
-
-
Method Detail
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
size
public int size()
- Returns:
- the number of positions in the list
-
getLongitude
public double getLongitude(int pos)
- Parameters:
pos- position index- Returns:
- longitude for position
-
getLatitude
public double getLatitude(int pos)
- Parameters:
pos- position index- Returns:
- latitude for position
-
add
public void add(double latitude, double longitude)Add a position at the end of the list
-
insert
public void insert(int pos, double latitude, double longitude)Add a position at a given index in the list. The rest of the list is shifted one place to the "right"- Parameters:
pos- position index
-
replace
public void replace(int pos, double latitude, double longitude)Replace the position at the index with new values- Parameters:
pos- position index
-
remove
public void remove(int pos)
Remove the position at the index, the rest of the list is shifted one place to the "left"- Parameters:
pos- position index
-
-