Maven module :un.api : api-image :
Class : un.impl.image.process.detection.Path
Extends/Implements : -
Subclasses : -

Combines a sequence of directions into a path that is rooted at some point in
the plane. No restrictions are placed on paths; they may be zero length,
open/closed, self-intersecting. Path objects are immutable.
Origin :
http://www.tomgibara.com/computer-vision/Path.java
author  Tom Gibara (Original author)
author  Johann Sorel (Adapted to Unlicense-Lib)


Variables : -
Functions : Path, getDirections, getOriginX, getOriginY, getTerminalX, getTerminalY, getLength, isClosed, translate, equals, hashCode, toString




Convenience constructor that converts the supplied direction list into an
array which is then passed to another constructor.

@param startX the x coordinate of the path's origin in the plane
@param startY the y coordinate of the path's origin in the plane
@param directions a list of the directions in the path
public void Path (int startX, int startY, Sequence directions)


return  an immutable list of the directions that compose this path, never
null
public Sequence getDirections ()


return  the x coordinate in the plane at which the path begins
public int getOriginX ()


return  the y coordinate in the plane at which the path begins
public int getOriginY ()


return  the x coordinate in the plane at which the path ends
public int getTerminalX ()


return  the y coordinate in the plane at which the path ends
public int getTerminalY ()


return  the length of the path using the standard euclidean metric
public double getLength ()


return  true if and only if the path's point of origin is the same as
that of its point of termination
public boolean isClosed ()


Creates a new path by translating this path in the plane.

@param deltaX the change in the path's x coordinate
@param deltaY the change in the path's y coordinate
@return a new path whose origin has been translated
public Path translate (int deltaX, int deltaY)


Two paths are equal if they have the same origin and the same directions.
public boolean equals (Object obj)

public int hashCode ()

public String toString ()