Interface ITableSortCallBack

All Superinterfaces:
All Known Implementing Classes:

public interface ITableSortCallBack
extends Serializable

Provides access to members that compare field values for a table sort operation.


The ITableSortCallBack mechanism allows you to perform custom sorting operations. The compare method in ITableSortCallback is called each time two values need to be compared. From these two values, you need to evaluate which is the greater or lesser, or if the two values are equal. The default implementation is to compare the entire values. With the ITableSortCallBack interface you can compare parts of the two values. For example, if you want to sort on an address field which includes street numbers and names, you can parse the two values to omit the street number and then compare the remaining values, the street names.

When the compare method is called, the table field index and the sort field index are returned. The sort index refers to the current field number that you are comparing in the field list you specified to sort on.

Product Availability

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

Method Summary
 int compare(Object value1, Object value2, int fieldIndex, int fieldSortIndex)
          Compare fields.

Method Detail


int compare(Object value1,
            Object value2,
            int fieldIndex,
            int fieldSortIndex)
            throws IOException,
Compare fields. Return result as 0 = match, -1 = field1 < field2, 1 = field1 > field2, 2 = force caller to calculate.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

value1 - A Variant (in)
value2 - A Variant (in)
fieldIndex - The fieldIndex (in)
fieldSortIndex - The fieldSortIndex (in)
The result
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ITableSortCallBack,, java.lang.Object, int, int)