Class SearchPath
- java.lang.Object
-
- com.treasure.hunt.strategy.geom.HintAndMovement
-
- com.treasure.hunt.strategy.searcher.SearchPath
-
public class SearchPath extends HintAndMovement
This is the path of the searcher in the plain searching the treasure, stored as a list ofPoints.
-
-
Constructor Summary
Constructors Constructor Description SearchPath(org.locationtech.jts.geom.Point... points)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAdditionalItem(GeometryItem<?> geometryItem)voidaddPoint(org.locationtech.jts.geom.Point point)voidaddPointToFront(org.locationtech.jts.geom.Point point)java.util.List<GeometryItem<?>>getAdditional()The list of additional items which should be displayed with this SearchPath.org.locationtech.jts.geom.PointgetFirstPoint()org.locationtech.jts.geom.PointgetLastPoint()doublegetLength()java.util.List<GeometryItem<org.locationtech.jts.geom.LineString>>getLineGeometryItems()java.util.List<org.locationtech.jts.geom.LineString>getLines()java.util.List<org.locationtech.jts.geom.Point>getPoints()The list of points representing the searching path of the corresponding searcher.java.util.List<GeometryItem<org.locationtech.jts.geom.Point>>getPointsExceptTheFirst()voidsetPoints(java.util.List<org.locationtech.jts.geom.Point> points)The list of points representing the searching path of the corresponding searcher.-
Methods inherited from class com.treasure.hunt.strategy.geom.HintAndMovement
getStatusMessageItemsToBeAdded, getStatusMessageItemsToBeRemoved
-
-
-
-
Method Detail
-
getFirstPoint
public org.locationtech.jts.geom.Point getFirstPoint()
- Returns:
- the first points of the moves-sequence.
-
getLastPoint
public org.locationtech.jts.geom.Point getLastPoint()
- Returns:
- the last end-position of the moves-sequence.
-
addPoint
public void addPoint(org.locationtech.jts.geom.Point point)
- Parameters:
point- The nextPoint, visited in this movement.
-
addPointToFront
public void addPointToFront(org.locationtech.jts.geom.Point point)
- Parameters:
point- thePoint, theSearcherstarts its movement from.
-
addAdditionalItem
public void addAdditionalItem(GeometryItem<?> geometryItem)
- Parameters:
geometryItem- to addGeometryItemobjects, which are only relevant for displaying
-
getPointsExceptTheFirst
public java.util.List<GeometryItem<org.locationtech.jts.geom.Point>> getPointsExceptTheFirst()
- Returns:
- a list, containing every
Pointof this SearchPath, except the first. List could be empty. - Throws:
java.lang.IllegalStateException- if this SearchPath contains zeroPoints.
-
getLineGeometryItems
public java.util.List<GeometryItem<org.locationtech.jts.geom.LineString>> getLineGeometryItems()
- Returns:
- A list of
GeometryItems, each containing aLineString. This describes the movement of theSearcher. - Throws:
java.lang.IllegalStateException- if this searchPath contains zeroPoints.
-
getLines
public java.util.List<org.locationtech.jts.geom.LineString> getLines()
- Returns:
- A list of
LineString, describing the movement of theSearcher. - Throws:
java.lang.IllegalStateException- if this searchPath contains zeroPoints.
-
getLength
public double getLength()
- Returns:
- the distance, of this searchPath.
-
getPoints
public java.util.List<org.locationtech.jts.geom.Point> getPoints()
The list of points representing the searching path of the corresponding searcher.
-
setPoints
public void setPoints(java.util.List<org.locationtech.jts.geom.Point> points)
The list of points representing the searching path of the corresponding searcher.
-
getAdditional
public java.util.List<GeometryItem<?>> getAdditional()
The list of additional items which should be displayed with this SearchPath.
-
-