public class PositionList extends Object implements Cloneable, Serializable
Constructor and Description |
---|
PositionList()
Creates a new empty instance of PositionList
|
Modifier and Type | Method and Description |
---|---|
void |
add(double latitude,
double longitude)
Add a position at the end of the list
|
Object |
clone() |
boolean |
equals(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() |
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int size()
public double getLongitude(int pos)
pos
- position indexpublic double getLatitude(int pos)
pos
- position indexpublic void add(double latitude, double longitude)
public void insert(int pos, double latitude, double longitude)
pos
- position indexpublic void replace(int pos, double latitude, double longitude)
pos
- position indexpublic void remove(int pos)
pos
- position indexCopyright © 2021. All rights reserved.