public final class ShallowImmutablePointList extends PointList
PointList.makeImmutable().| Constructor and Description |
|---|
ShallowImmutablePointList(int fromOffset,
int toOffset,
PointList wrappedPointList) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(double lat,
double lon,
double ele) |
void |
add(PointList points) |
void |
clear() |
void |
ensureNode(int nodeId)
This method ensures that the node with the specified index exists i.e.
|
int |
getDimension() |
double |
getElevation(int index)
Returns the elevation of the specified nodeId.
|
double |
getLatitude(int index) |
double |
getLongitude(int index) |
int |
getSize() |
boolean |
is3D() |
boolean |
isEmpty() |
boolean |
isImmutable() |
void |
makeImmutable()
Once immutable, there is no way to make this object mutable again.
|
void |
parse2DJSON(String str)
Takes the string from a json array ala [lon1,lat1], [lon2,lat2], ...
|
void |
removeLastPoint() |
void |
reverse() |
void |
set(int index,
double lat,
double lon,
double ele) |
void |
setElevation(int index,
double ele) |
void |
setNode(int nodeId,
double lat,
double lon)
This method ensures that the node with the specified index exists and prepares access to it.
|
void |
setNode(int nodeId,
double lat,
double lon,
double ele)
This method ensures that the node with the specified index exists and prepares access to it.
|
int |
size() |
void |
trimToSize(int newSize) |
add, add, add, calcDistance, clone, copy, equals, from, getEle, getLat, getLon, hashCode, iterator, shallowCopy, toGeoJson, toGeoJson, toGHPoint, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ShallowImmutablePointList(int fromOffset,
int toOffset,
PointList wrappedPointList)
public double getLatitude(int index)
getLatitude in interface PointAccessgetLatitude in class PointListpublic double getLongitude(int index)
getLongitude in interface PointAccessgetLongitude in class PointListpublic double getElevation(int index)
PointAccessgetElevation in interface PointAccessgetElevation in class PointListpublic void setElevation(int index,
double ele)
setElevation in class PointListpublic void makeImmutable()
PointListmakeImmutable in class PointListpublic boolean isImmutable()
isImmutable in class PointListpublic boolean is3D()
is3D in interface PointAccessis3D in class PointListpublic int getDimension()
getDimension in interface PointAccessgetDimension in class PointListpublic void ensureNode(int nodeId)
PointAccessensureNode in interface PointAccessensureNode in class PointListpublic void setNode(int nodeId,
double lat,
double lon)
PointAccessThis methods sets the latitude, longitude and elevation to the specified value.
setNode in interface PointAccesssetNode in class PointListpublic void setNode(int nodeId,
double lat,
double lon,
double ele)
PointAccessThis methods sets the latitude, longitude and elevation to the specified value.
setNode in interface PointAccesssetNode in class PointListpublic void set(int index,
double lat,
double lon,
double ele)
public void removeLastPoint()
removeLastPoint in class PointListpublic void trimToSize(int newSize)
trimToSize in class PointListpublic void parse2DJSON(String str)
PointListparse2DJSON in class PointListCopyright © 2012–2018. All rights reserved.