Class PolylineChange
java.lang.Object
com.luciad.geometries.constraints.PolylineChange
- All Implemented Interfaces:
AutoCloseable
Describes a change that was made to a
Polyline geometry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInsertedPoint(long insertedPointIndex) Adds the index of the point that is inserted.voidaddMovedPoint(long movedPointIndex) Adds the index of the point that is moved.voidaddRemovedPoint(long removedPointIndex) Adds the index of the point that is removed.voidclose()protected voidfinalize()Returns the indices of the points in the new polyline that wereinsertedin this change.Returns the indices of the points in the new polyline that weremovedin this change.Returns the indices of the points in the old polyline that wereremovedin this change.Returns the translation that was applied on the polyline.booleanhasPointInserted(long index) Returns true if theinserted pointsof this change contain the given index.booleanhasPointMoved(long index) Returns true if themoved pointsof this change contain the given index.booleanhasPointRemoved(long index) Returns true if theremoved pointsof this change contain the given index.voidsetTranslation(Coordinate translation) Sets the translation that was applied on the polyline.
-
Constructor Details
-
PolylineChange
public PolylineChange()Constructs an empty polyline change.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getMovedPoints
Returns the indices of the points in the new polyline that weremovedin this change.This only considers individual point moves, so if the whole polyline was translated, this method can still return false for individual points. For checking whether a translation took place, see
getTranslation.- Returns:
- the indices of the points in the new polyline that were
movedin this change.
-
getRemovedPoints
Returns the indices of the points in the old polyline that wereremovedin this change.- Returns:
- the indices of the points in the old polyline that were
removedin this change.
-
getInsertedPoints
Returns the indices of the points in the new polyline that wereinsertedin this change.- Returns:
- the indices of the points in the new polyline that were
insertedin this change.
-
getTranslation
Returns the translation that was applied on the polyline.This is the result of use the method
translateon the polyline. The value may benullif no translation happened.- Returns:
- the translation that was applied on the polyline.
-
addMovedPoint
public void addMovedPoint(long movedPointIndex) Adds the index of the point that is moved.- Parameters:
movedPointIndex- the index of the point in the new polyline that wasmovedin this change.- See Also:
-
addRemovedPoint
public void addRemovedPoint(long removedPointIndex) Adds the index of the point that is removed.- Parameters:
removedPointIndex- the index of the point in the old polyline that wasremovedin this change.- See Also:
-
addInsertedPoint
public void addInsertedPoint(long insertedPointIndex) Adds the index of the point that is inserted.- Parameters:
insertedPointIndex- the index of the point in the new polyline that wasinsertedin this change.- See Also:
-
setTranslation
Sets the translation that was applied on the polyline.- Parameters:
translation- the translation that wasappliedon the polyline in this change.- See Also:
-
hasPointMoved
public boolean hasPointMoved(long index) Returns true if themoved pointsof this change contain the given index.- Parameters:
index- the point index in the new polyline.- Returns:
- true if the
moved pointsof this change contain the given index.
-
hasPointRemoved
public boolean hasPointRemoved(long index) Returns true if theremoved pointsof this change contain the given index.- Parameters:
index- the point index in the old polyline.- Returns:
- true if the
removed pointsof this change contain the given index.
-
hasPointInserted
public boolean hasPointInserted(long index) Returns true if theinserted pointsof this change contain the given index.- Parameters:
index- the point index in the new polyline.- Returns:
- true if the
inserted pointsof this change contain the given index.
-