public class PositionList
extends java.lang.Object
implements java.lang.Cloneable, java.io.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
|
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() |
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic 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 © 2025. All rights reserved.