Microsoft SDK for Java

invertComparisonResult

This method of the IntRanges Class inverts comparison results.

Syntax

public static int invertComparisonResult(int cmp);

Return Value

Returns the inverted comparison result. If cmp is a valid SetComparison result, and is not one of the four results that are inverted, the result is simply returned.

Exceptions

Throws InternalError if cmp is not a valid SetComparison result.

Parameters

cmp Any comparison result of the compare method, which is inverted as follows:
  1. SUBSET returns SUPERSET.

  2. SUPERSET returns SUBSET.

  3. EMPTY_SUBSET returns EMPTY_SUPERSET.

  4. EMPTY_SUPERSET returns EMPTY_SUBSET

  5. Any other result is not affected and is simply returned. Note that EQUAL and DISJOINT are not inverted by this function.

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