Microsoft SDK for Java

invertComparisonResult

This method of the PermissionUtils Class inverts comparison results.

Syntax

public static int invertComparisonResult(int cmp);

Return Value

Returns the inverted comparison result, described as follows:

If cmp is SUBSET, SUPERSET is returned.

If cmp is SUPERSET, SUBSET is returned.

If cmp is EMPTY_SUBSET, EMPTY_SUPERSET is returned.

If cmp is EMPTY_SUPERSET, EMPTY_SUBSET is returned.

Any other result is not affected by this method and is simply returned. Notice that EQUAL and DISJOINT are not inverted by this method.

Parameters

cmp The result to be inverted. It can be any of the following comparison results of the compare method:

SetComparison.SUBSET returns SetComparison.SUPERSET.

SetComparison.SUPERSET returns SetComparison.SUBSET.

SetComparison.EMPTY_SUBSET returns SetComparison.EMPTY_SUPERSET.

SetComparison.EMPTY_SUPERSET returns SetComparison.EMPTY_SUBSET.


© 1999 Microsoft Corporation. All rights reserved. Terms of use.