com.sun.syndication.feed.module.georss.geometries
Class PositionList

java.lang.Object
  extended by com.sun.syndication.feed.module.georss.geometries.PositionList
All Implemented Interfaces:
java.lang.Cloneable

public class PositionList
extends java.lang.Object
implements java.lang.Cloneable

A list of geographic positions, latitude, longitude decimal degrees WGS84

Author:
runaas

Constructor Summary
PositionList()
          Creates a new empty instance of PositionList
 
Method Summary
 void add(double latitude, double longitude)
          Add a position at the end of the list
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 double getLatitude(int pos)
           
 double getLongitude(int pos)
           
 void insert(int pos, double latitude, double longitude)
          Add a position at a given index in the list.
 void remove(int pos)
          Remove the position at the index, the rest of the list is shifted one place to the "left"
 void replace(int pos, double latitude, double longitude)
          Replace the position at the index with new values
 int size()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionList

public PositionList()
Creates a new empty instance of PositionList

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

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

Parameters:
latitude -
longitude -

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
latitude -
longitude -

replace

public void replace(int pos,
                    double latitude,
                    double longitude)
Replace the position at the index with new values

Parameters:
pos - position index
latitude -
longitude -

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