com.esri.core.geometry
Class SegmentIterator

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

public class SegmentIterator
extends Object

Provides functionality to iterate over MultiPath segments.


Method Summary
protected  Object _getImpl()
           
 Object 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 path
 boolean isFirstSegmentInPath()
          Returns True if the segment is first one in the current Path.
 boolean isLastSegmentInPath()
          Returns True if the segment is last one in the current Path.
 boolean nextPath()
          Moves the iterator to the next path.
 Segment nextSegment()
          Moves the iterator to next segment and returns the segment.
 boolean previousPath()
          Moves the iterator to the previous path.
 Segment previousSegment()
          Moves the iterator to next segment and returns the segment.
 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 setCirculator(boolean bYesNo)
          Switches the iterator 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.


previousPath

public boolean previousPath()
Moves the iterator to the previous path. Returns the 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.


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.


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.


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.


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 next segment and returns the segment. The Segment is returned by value and is owned by the iterator.


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.


getEndPointIndex

public int getEndPointIndex()
Returns the index of the end Point of the current Segment.


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. \param bYesNo If True, the iterator loops over the current path infinitely (unless the MultiPath is empty).


copy

public Object copy()

_getImpl

protected Object _getImpl()


Copyright © 2010. All Rights Reserved.