Microsoft SDK for Java

compare

The compare method of the IntRanges Class contains the following signatures:

compare(IntRanges other)
compare(IntRanges other, IIntRangeComparator judge)

compare(IntRanges other)

Compares this set of ranges to another.

Syntax

public int compare(IntRanges other);

Return Value

Returns the ranges shown in the following table.

OVERLAP If the sets of integers are not equal, but have a common set of integers.
DISJOINT If the sets of integers have no integers in common.
SUBSET If the second set of integers includes all the integers in the first set, plus some integers that are not in the first set.
EQUAL If the sets of integers are identical.
SUPERSET If the first set of integers includes all the integers in the second set, plus some integers that are not in the second set.
EMPTY If both sets of integers are empty.
EMPTY_SUBSET If pairs1 is empty and pairs2 is not empty.
EMPTY_SUPERSET If pairs2 is empty and pairs1 is not empty.

Parameters

other The set of ranges to compare with.

compare(IntRanges other, IIntRangeComparator judge)

Compares this set of ranges to another.

Syntax

public int compare(IntRanges other, IIntRangeComparator judge);

Return Value

Returns ranges shown in the following table.

OVERLAP If the sets of integers are not equal, but have a common set of integers.
DISJOINT If the sets of integers have no integers in common.
SUBSET If the second set of integers includes all the integers in the first set, plus some integers that are not in the first set.
EQUAL If the sets of integers are identical.
SUPERSET If the first set of integers includes all the integers in the second set, plus some integers that are not in the second set.
EMPTY If both sets of integers are empty.
EMPTY_SUBSET If pairs1 is empty and pairs2 is not empty.
EMPTY_SUPERSET If pairs2 is empty and pairs1 is not empty.

Parameters

other The set of ranges to compare with.
judge A helper interface for the comparison.

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