Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.util   Previous This
Package
Next

 


Interface IWildcardExpressionComparator

public interface IWildcardExpressionComparator
{
  // Methods
  int compareSubexpressions (WildcardExpression expr1,
        int exprnum1, WildcardExpression expr2, int exprnum2, int
        cmpresult);
  void deleteSubexpression (WildcardExpression expr, int exprnum);
  void intersectSubexpressions (WildcardExpression expr1,
        int exprnum1, WildcardExpression expr2, int exprnum2, int
        cmpresult);
}

This interface is used to compare subexpressions in WildcardExpression.compare.

Methods

compareSubexpressions

int compareSubexpressions (WildcardExpression expr1, int exprnum1,
        WildcardExpression expr2, int exprnum2, int cmpresult);

Compares two subexpressions of different expressions.

Return Value:

Returns a SetComparison result code that is valid with WildcardExpression. This can be one of the following:

ParameterDescription
expr1 The first expression operand.
exprnum1 The subexpression of expr1 to compare.
expr2 The second expression operand.
exprnum2 The subexpression of expr2 to compare.
cmpresult The result of comparing the given subexpressions (a SetComparison result code).

The cmpresult value must be computed before calling this function. The subexpressions are compared, and passed to this method as cmpresult. The return value of compareSubexpressions is possibly completely independent of cmpresult. The return value is the result of comparing any extra elements that clients of WildcardExpression may have associated with each subexpression.

deleteSubexpression

void deleteSubexpression (WildcardExpression expr, int exprnum);

Called by condense when redundant expressions need to be deleted.

Return Value:

No return value.

ParameterDescription
expr The expression from which to delete the subexpression.
exprnum The expression number, which is the original expression index, before any deletions have occurred. The new expression numbers will take effect after condense has completed.

intersectSubexpressions

void intersectSubexpressions (WildcardExpression expr1, int exprnum1,
        WildcardExpression expr2, int exprnum2, int cmpresult);

Called by WildcardExpression.intersect to find the intersection of any data associated with two subexpressions. The resulting data should be retained for the final intersected expression.

Return Value:

No return value.

ParameterDescription
expr1 The first expression operand.
exprnum1 The subexpression of expr1 to compare.
expr2 The second expression operand.
exprnum2 The subexpression of expr2 to compare.
cmpresult The result of comparing the given subexpressions.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.