com.esri.arcgis.geometry
Class IEnumSegmentProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geometry.IEnumSegmentProxy
All Implemented Interfaces:
IEnumSegment, Externalizable, Serializable

public class IEnumSegmentProxy
extends com.esri.arcgis.interop.Dispatch
implements IEnumSegment, Serializable

Provides access to members that iterate over collections of segments (obtained from the EnumSegments property on the ISegmentCollection interface).

Description

The methods on IEnumSegment interface can be used to access segments of a segment collection. Those methods are more efficient than the ISegmentCollection methods to access a large number of segments in a sequential order for polyline and polygon. The collection methods transform absolute segment index into a part relative index, enumerators don't.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IEnumSegmentProxy()
           
  IEnumSegmentProxy(Object obj)
           
protected IEnumSegmentProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void esri_clone(IEnumSegment[] outEnumerator)
          Returns a copy of this enumerator positioned at the same segment.
 boolean isLastInPart()
          Indicates if the current segment is last in the current part.
 boolean isRecycling()
          Indicates if this enumerator re-uses the same segment each time next is called.
 void next(ISegment[] outSegment, int[] outPartIndex, int[] segmentIndex)
          Returns the next segment, and its location in the collection.
 void nextEx(_esriSegmentInfo[] outSegment)
          Populates a segment info structure with information on the next segment in the collection.
 void nextInPart(ISegment[] outSegment, int[] outSegmentIndex)
          Returns the next segment in current part, goes back to first segment after last segment in part is encountered.
 void nextInPartEx(_esriSegmentInfo[] outSegment)
          Returns the next segment info structure in current part, goes back to first segment after last segment in part is encountered.
 void previous(ISegment[] outSegment, int[] outPartIndex, int[] segmentIndex)
          Returns the previous segment in this segment collection.
 void removeListener(String iidStr, Object theListener)
           
 void reset()
          Starts from the beginning of the segment collection the next time Next is called.
 void resetToEnd()
          Starts from the end of the path, ring, polyline or polygon the next time Previous is called.
 void setAt(int iPart, int iSegment)
          Resets enumerator to specific location.
 void skip(int numSegments)
          Skips forward or backward over a specified number of segments.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IEnumSegmentProxy

public IEnumSegmentProxy()

IEnumSegmentProxy

public IEnumSegmentProxy(Object obj)
                  throws IOException
Throws:
IOException

IEnumSegmentProxy

protected IEnumSegmentProxy(Object obj,
                            String iid)
                     throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

nextEx

public void nextEx(_esriSegmentInfo[] outSegment)
            throws IOException,
                   AutomationException
Populates a segment info structure with information on the next segment in the collection.

Description

The NextEx method advances the enumerator to the next position and returns the segment and the associated information using an esriSegmentInfo structure.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextEx in interface IEnumSegment
Parameters:
outSegment - A Structure: com.esri.arcgis.geometry._esriSegmentInfo (A com.esri.arcgis.geometry._esriSegmentInfo COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

next

public void next(ISegment[] outSegment,
                 int[] outPartIndex,
                 int[] segmentIndex)
          throws IOException,
                 AutomationException
Returns the next segment, and its location in the collection. If the location does not have parts (i.e. a path or ring) then the part index will always be zero.

Description

The NextEx method advances the enumerator to the next position, returns the segment, the part index and the segment index.

Remarks

See picture for a graphical explanation of some of the IEnumSegment methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
next in interface IEnumSegment
Parameters:
outSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
outPartIndex - The outPartIndex (in/out: use single element array)
segmentIndex - The segmentIndex (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

skip

public void skip(int numSegments)
          throws IOException,
                 AutomationException
Skips forward or backward over a specified number of segments.

Description

The skip method jumps over a given number of segments in ascending (positive number) or descending (negative number) order and set the enumerator at that position. For example, if the enumerator is in its initial position (ex: after reset) calling skip 2 will move the enumerator to the position just before segment index= 2, therefore calling next will return segment index = 2.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
skip in interface IEnumSegment
Parameters:
numSegments - The numSegments (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Starts from the beginning of the segment collection the next time Next is called.

Description

Reset the enumerator. For example, the following call to IEnumSegment::Next returns segment index = 0.

Remarks

See picture for a graphical explanation of some of the IEnumSegment methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
reset in interface IEnumSegment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public void esri_clone(IEnumSegment[] outEnumerator)
                throws IOException,
                       AutomationException
Returns a copy of this enumerator positioned at the same segment.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Specified by:
esri_clone in interface IEnumSegment
Parameters:
outEnumerator - A reference to a com.esri.arcgis.geometry.IEnumSegment (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

resetToEnd

public void resetToEnd()
                throws IOException,
                       AutomationException
Starts from the end of the path, ring, polyline or polygon the next time Previous is called.

Description

The ResetToEnd method set the enumerator to its end. Using the Previous method in this situation will return the last segment of the last part.

Remarks

See picture for a graphical explanation of some of the IEnumSegment methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
resetToEnd in interface IEnumSegment
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

previous

public void previous(ISegment[] outSegment,
                     int[] outPartIndex,
                     int[] segmentIndex)
              throws IOException,
                     AutomationException
Returns the previous segment in this segment collection.

Description

The Previous method returns the segment before the current position. For example, if the enumerator is in position Part Index = 0 and Segment Index = 1, then calling previous will return the segment located at Part Index = 0 and Segment Index = 0.

Remarks

See picture for a graphical explanation of some of the IEnumSegment methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
previous in interface IEnumSegment
Parameters:
outSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
outPartIndex - The outPartIndex (in/out: use single element array)
segmentIndex - The segmentIndex (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAt

public void setAt(int iPart,
                  int iSegment)
           throws IOException,
                  AutomationException
Resets enumerator to specific location.

Description

The SetAt method allows setting the enumerator at any given location in the enumerator. Then using the Next method will return the specified segment. For example, using SetAt(1,0) followed by Next will return the segment located at Part Index = 1 and Segment Index = 0.

Remarks

See picture for a graphical explanation of some of the IEnumSegment methods.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAt in interface IEnumSegment
Parameters:
iPart - The iPart (in)
iSegment - The iSegment (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextInPartEx

public void nextInPartEx(_esriSegmentInfo[] outSegment)
                  throws IOException,
                         AutomationException
Returns the next segment info structure in current part, goes back to first segment after last segment in part is encountered.

Description

The NextInPartEx method is returning the next segment in the current part along with more information about the segment than the NextInPart method. As oppose to the Next method the NextInpartEx method limits its search to the part where the enumerator is currently located. For example, if the enumerator is located on the last segment of a given part then NextInPartEx will return the first segment of that part.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextInPartEx in interface IEnumSegment
Parameters:
outSegment - A Structure: com.esri.arcgis.geometry._esriSegmentInfo (A com.esri.arcgis.geometry._esriSegmentInfo COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nextInPart

public void nextInPart(ISegment[] outSegment,
                       int[] outSegmentIndex)
                throws IOException,
                       AutomationException
Returns the next segment in current part, goes back to first segment after last segment in part is encountered.

Description

The NextInPart method is returning the next segment in the current part. As oppose to the Next method the NextInpart method limits its search to the part where the enumerator is currently located. For example, if the enumerator is located on the last segment of a given part then NextInPartEx will return the first segment of that part.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
nextInPart in interface IEnumSegment
Parameters:
outSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
outSegmentIndex - The outSegmentIndex (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLastInPart

public boolean isLastInPart()
                     throws IOException,
                            AutomationException
Indicates if the current segment is last in the current part.

Description

The IsLastInPart method returns 'True' if the enumerator is located on the last segment of a given part. For example, if a polyline has 2 parts and 3 segments in each part, IsLastInPart would return 'true' when the enumerator is located at Part Index = 0 Segment Index = 2 and Part Index = 1 Segment Index = 2.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isLastInPart in interface IEnumSegment
Returns:
The isLastInPart
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isRecycling

public boolean isRecycling()
                    throws IOException,
                           AutomationException
Indicates if this enumerator re-uses the same segment each time next is called.

Description

The IsRecycling method indicates whether or not modifications to segments in the segment collection are seen or not by the enumerator. If 'True' then modifications to segments will not be seen by the enumerator, if 'False' then the enumerator is always up to date and represents the current state of the segment collection.

Remarks

Note: The IsRecycling state is contolled by the system and cannot be directly changed by users.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isRecycling in interface IEnumSegment
Returns:
The isRecycling
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.