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 |
getEle(int index)
Returns the elevation of the specified nodeId.
|
String |
getIntervalString() |
double |
getLat(int index) |
double |
getLon(int index) |
int |
getSize() |
boolean |
is3D() |
boolean |
isEmpty() |
boolean |
isImmutable() |
PointList |
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,
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, clone, copy, equals, equalsEps, equalsEps, from, fromLineString, get, getCachedLineString, hashCode, iterator, shallowCopy, toLineString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorsetNodepublic ShallowImmutablePointList(int fromOffset,
int toOffset,
PointList wrappedPointList)
public int getSize()
public String getIntervalString()
public double getLat(int index)
getLat in interface PointAccessgetLat in class PointListpublic double getLon(int index)
getLon in interface PointAccessgetLon in class PointListpublic double getEle(int index)
PointAccessgetEle in interface PointAccessgetEle in class PointListpublic void setElevation(int index,
double ele)
setElevation in class PointListpublic PointList 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,
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–2023. All rights reserved.