Package com.esri.core.geometry
Class SegmentIteratorImpl
- java.lang.Object
-
- com.esri.core.geometry.SegmentIteratorImpl
-
final class SegmentIteratorImpl extends java.lang.Object
Provides functionality to iterate over MultiPath segments.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_bCirculator
protected boolean
m_bNeedsUpdate
protected int
m_currentPathIndex
protected Segment
m_currentSegment
protected int
m_currentSegmentIndex
protected Point2D
m_dummyPoint
protected Line
m_line
protected int
m_nextPathIndex
protected int
m_nextSegmentIndex
protected MultiPathImpl
m_parent
protected int
m_pathBegin
protected int
m_prevPathIndex
protected int
m_prevSegmentIndex
protected int
m_segmentCount
-
Constructor Summary
Constructors Constructor Description SegmentIteratorImpl(MultiPathImpl parent)
SegmentIteratorImpl(MultiPathImpl parent, int pointIndex)
SegmentIteratorImpl(MultiPathImpl parent, int pathIndex, int segmentIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
_getPathBegin()
int
_getSegmentCount(int pathIndex)
void
_updateSegment()
SegmentIteratorImpl
copy()
int
getEndPointIndex()
Returns the index of the end Point of the current Segment.int
getPathIndex()
Returns the index of the current path.int
getStartPointIndex()
Returns the index of the start Point of the current Segment.boolean
hasNextSegment()
Returns True if the call to the NextSegment will succeed.boolean
hasPreviousSegment()
Returns True if the call to the NextSegment will succeed.boolean
isClosingSegment()
Returns True, if the segment is the closing segment of the closed pathboolean
isFirstSegmentInPath()
Returns True if the segment is first one in the current Path.(package private) boolean
isLastPath()
boolean
isLastSegmentInPath()
Returns True if the segment is last one in the current Path.Segment
nextCurve()
Moves the iterator to the next curve segment and returns the segment.boolean
nextPath()
Moves the iterator to next path and returns true if successful.Segment
nextSegment()
Moves the iterator to next segment and returns the segment.boolean
previousPath()
Moves the iterator to next path and returns true if successful.Segment
previousSegment()
Moves the iterator to previous segment and returns the segment.(package private) void
resetTo(SegmentIteratorImpl src)
void
resetToFirstPath()
Resets the iterator such that the subsequent call to the NextPath will set the iterator to the first segment of the first path.void
resetToFirstSegment()
Resets the iterator so that the call to NextSegment will return the first segment of the current path.void
resetToLastPath()
Resets the iterator such that the subsequent call to the PreviousPath will set the iterator to the last segment of the last path.void
resetToLastSegment()
Resets the iterator so that the call to PreviousSegment will return the last segment of the current path.void
resetToPath(int pathIndex)
Resets the iterator such that the subsequent call to the NextPath will set the iterator to the first segment of the given path.void
resetToVertex(int vertexIndex)
void
resetToVertex(int vertexIndex, int _pathIndex)
void
setCirculator(boolean bYesNo)
Switches the iterator navigation mode.
-
-
-
Field Detail
-
m_line
protected Line m_line
-
m_currentSegment
protected Segment m_currentSegment
-
m_dummyPoint
protected Point2D m_dummyPoint
-
m_currentPathIndex
protected int m_currentPathIndex
-
m_nextPathIndex
protected int m_nextPathIndex
-
m_prevPathIndex
protected int m_prevPathIndex
-
m_currentSegmentIndex
protected int m_currentSegmentIndex
-
m_nextSegmentIndex
protected int m_nextSegmentIndex
-
m_prevSegmentIndex
protected int m_prevSegmentIndex
-
m_segmentCount
protected int m_segmentCount
-
m_pathBegin
protected int m_pathBegin
-
m_parent
protected MultiPathImpl m_parent
-
m_bCirculator
protected boolean m_bCirculator
-
m_bNeedsUpdate
protected boolean m_bNeedsUpdate
-
-
Constructor Detail
-
SegmentIteratorImpl
public SegmentIteratorImpl(MultiPathImpl parent)
-
SegmentIteratorImpl
public SegmentIteratorImpl(MultiPathImpl parent, int pointIndex)
-
SegmentIteratorImpl
public SegmentIteratorImpl(MultiPathImpl parent, int pathIndex, int segmentIndex)
-
-
Method Detail
-
resetTo
void resetTo(SegmentIteratorImpl src)
-
nextCurve
public Segment nextCurve()
Moves the iterator to the next curve segment and returns the segment. The Segment is returned by value and is owned by the iterator. Note: The method can return null if there are no curves in the part.
-
nextSegment
public Segment nextSegment()
Moves the iterator to next segment and returns the segment. The Segment is returned by value and is owned by the iterator.
-
previousSegment
public Segment previousSegment()
Moves the iterator to previous segment and returns the segment. The Segment is returned by value and is owned by the iterator.
-
resetToFirstSegment
public void resetToFirstSegment()
Resets the iterator so that the call to NextSegment will return the first segment of the current path.
-
resetToLastSegment
public void resetToLastSegment()
Resets the iterator so that the call to PreviousSegment will return the last segment of the current path.
-
resetToVertex
public void resetToVertex(int vertexIndex)
-
resetToVertex
public void resetToVertex(int vertexIndex, int _pathIndex)
-
nextPath
public boolean nextPath()
Moves the iterator to next path and returns true if successful.
-
previousPath
public boolean previousPath()
Moves the iterator to next path and returns true if successful.
-
resetToFirstPath
public void resetToFirstPath()
Resets the iterator such that the subsequent call to the NextPath will set the iterator to the first segment of the first path.
-
resetToLastPath
public void resetToLastPath()
Resets the iterator such that the subsequent call to the PreviousPath will set the iterator to the last segment of the last path.
-
resetToPath
public void resetToPath(int pathIndex)
Resets the iterator such that the subsequent call to the NextPath will set the iterator to the first segment of the given path. The call to PreviousPath will reset the iterator to the last segment of path pathIndex - 1.
-
_getSegmentCount
public int _getSegmentCount(int pathIndex)
-
isClosingSegment
public boolean isClosingSegment()
Returns True, if the segment is the closing segment of the closed path
-
setCirculator
public void setCirculator(boolean bYesNo)
Switches the iterator navigation mode.- Parameters:
bYesNo
- If True, the iterator loops over the current path infinitely (unless the MultiPath is empty).
-
getPathIndex
public int getPathIndex()
Returns the index of the current path.
-
getStartPointIndex
public int getStartPointIndex()
Returns the index of the start Point of the current Segment.
-
_getPathBegin
public int _getPathBegin()
-
getEndPointIndex
public int getEndPointIndex()
Returns the index of the end Point of the current Segment.
-
isFirstSegmentInPath
public boolean isFirstSegmentInPath()
Returns True if the segment is first one in the current Path.
-
isLastSegmentInPath
public boolean isLastSegmentInPath()
Returns True if the segment is last one in the current Path.
-
hasNextSegment
public boolean hasNextSegment()
Returns True if the call to the NextSegment will succeed.
-
hasPreviousSegment
public boolean hasPreviousSegment()
Returns True if the call to the NextSegment will succeed.
-
copy
public SegmentIteratorImpl copy()
-
_updateSegment
public void _updateSegment()
-
isLastPath
boolean isLastPath()
-
-