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.
|
String |
getIntervalString() |
double |
getLatitude(int index) |
double |
getLongitude(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)
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, equalsEps, equalsEps, from, fromLineString, get, getCachedLineString, getEle, getLat, getLon, hashCode, iterator, shallowCopy, toLineString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public ShallowImmutablePointList(int fromOffset, int toOffset, PointList wrappedPointList)
public String getIntervalString()
public double getLatitude(int index)
getLatitude
in interface PointAccess
getLatitude
in class PointList
public double getLongitude(int index)
getLongitude
in interface PointAccess
getLongitude
in class PointList
public double getElevation(int index)
PointAccess
getElevation
in interface PointAccess
getElevation
in class PointList
public void setElevation(int index, double ele)
setElevation
in class PointList
public PointList makeImmutable()
PointList
makeImmutable
in class PointList
public boolean isImmutable()
isImmutable
in class PointList
public boolean is3D()
is3D
in interface PointAccess
is3D
in class PointList
public int getDimension()
getDimension
in interface PointAccess
getDimension
in class PointList
public void ensureNode(int nodeId)
PointAccess
ensureNode
in interface PointAccess
ensureNode
in class PointList
public void setNode(int nodeId, double lat, double lon)
PointAccess
This methods sets the latitude, longitude and elevation to the specified value.
setNode
in interface PointAccess
setNode
in class PointList
public void setNode(int nodeId, double lat, double lon, double ele)
PointAccess
This methods sets the latitude, longitude and elevation to the specified value.
setNode
in interface PointAccess
setNode
in class PointList
public void set(int index, double lat, double lon, double ele)
public void removeLastPoint()
removeLastPoint
in class PointList
public void trimToSize(int newSize)
trimToSize
in class PointList
public void parse2DJSON(String str)
PointList
parse2DJSON
in class PointList
Copyright © 2012–2020. All rights reserved.