The compare method of the IntRanges Class contains the following signatures:
compare(IntRanges other)
compare(IntRanges other, IIntRangeComparator judge)
Compares this set of ranges to another.
public int compare(IntRanges other);
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. |
other | The set of ranges to compare with. |
Compares this set of ranges to another.
public int compare(IntRanges other, IIntRangeComparator judge);
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. |
other | The set of ranges to compare with. |
judge | A helper interface for the comparison. |