com.esri.core.geometry
Class SegmentIterator

java.lang.Object
  extended by com.esri.core.geometry.SegmentIterator

public class SegmentIterator
extends Object

This class provides functionality to iterate over multipath segments.

Since:
1.0

Method Summary
protected  Object _getImpl()
           
 Object copy()
          Copies this SegmentIterator.
 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 this segment.
 boolean hasNextSegment()
          Indicates whether a next segment exists for the path.
 boolean hasPreviousSegment()
          Indicates whether a previous segment exists in the path.
 boolean isClosingSegment()
          Returns TRUE, if the segment is the closing segment of the closed path
 boolean isFirstSegmentInPath()
          Indicates whether the iterator points to the first segment in the current path.
 boolean isLastSegmentInPath()
          Indicates whether the iterator points to the last segment in the current path.
 boolean nextPath()
          Moves the iterator to the next path.
 Segment nextSegment()
          Moves the iterator to the next segment and returns the segment.
 boolean previousPath()
          Moves the iterator to the previous path.
 Segment previousSegment()
          Moves the iterator to previous segment and returns the segment.
 void resetToFirstPath()
          Resets the iterator such that a subsequent call to NextPath will set the iterator to 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 a subsequent call to PreviousPath will set the iterator to 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 a subsequent call to NextPath will set the iterator to the given path index.
 void setCirculator(boolean bYesNo)
          Switches the iterator to navigation mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nextPath

public boolean nextPath()
Moves the iterator to the next path. Returns the TRUE if successful.

Returns:
TRUE if the next path exists.
Since:
1.0

previousPath

public boolean previousPath()
Moves the iterator to the previous path. Returns the TRUE if successful.

Returns:
TRUE if the previous path exists.
Since:
1.0

resetToFirstPath

public void resetToFirstPath()
Resets the iterator such that a subsequent call to NextPath will set the iterator to the first path.

Since:
1.0

resetToLastPath

public void resetToLastPath()
Resets the iterator such that a subsequent call to PreviousPath will set the iterator to the last path.

Since:
1.0

resetToPath

public void resetToPath(int pathIndex)
Resets the iterator such that a subsequent call to NextPath will set the iterator to the given path index. A call to PreviousPath will set the iterator to the path at pathIndex - 1.

Since:
1.0

isFirstSegmentInPath

public boolean isFirstSegmentInPath()
Indicates whether the iterator points to the first segment in the current path.

Returns:
TRUE if the iterator points to the first segment in the current path.
Since:
1.0

isLastSegmentInPath

public boolean isLastSegmentInPath()
Indicates whether the iterator points to the last segment in the current path.

Returns:
TRUE if the iterator points to the last segment in the current path.
Since:
1.0

resetToFirstSegment

public void resetToFirstSegment()
Resets the iterator so that the call to NextSegment will return the first segment of the current path.

Since:
1.0

resetToLastSegment

public void resetToLastSegment()
Resets the iterator so that the call to PreviousSegment will return the last segment of the current path.

Since:
1.0

hasNextSegment

public boolean hasNextSegment()
Indicates whether a next segment exists for the path.

Returns:
TRUE is the next segment exists.
Since:
1.0

hasPreviousSegment

public boolean hasPreviousSegment()
Indicates whether a previous segment exists in the path.

Returns:
TRUE if the previous segment exists.
Since:
1.0

nextSegment

public Segment nextSegment()
Moves the iterator to the next segment and returns the segment. The Segment is returned by value and is owned by the iterator.

Since:
1.0

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.

Since:
1.0

getPathIndex

public int getPathIndex()
Returns the index of the current path.

Since:
1.0

getStartPointIndex

public int getStartPointIndex()
Returns the index of the start point of this segment.

Since:
1.0

getEndPointIndex

public int getEndPointIndex()
Returns the index of the end point of the current segment.

Since:
1.0

isClosingSegment

public boolean isClosingSegment()
Returns TRUE, if the segment is the closing segment of the closed path

Since:
1.0

setCirculator

public void setCirculator(boolean bYesNo)
Switches the iterator to navigation mode.

Parameters:
bYesNo - If TRUE, the iterator loops over the current path infinitely (unless the multipath is empty).
Since:
1.0

copy

public Object copy()
Copies this SegmentIterator.

Returns:
SegmentIterator.
Since:
1.0

_getImpl

protected Object _getImpl()


Copyright © 2012. All Rights Reserved.