Interface SetComparison
public interface SetComparison
{
// Fields
static final int DISJOINT;
static final int EMPTY;
static final int EMPTY_SUBSET;
static final int EMPTY_SUPERSET;
static final int EQUAL;
static final int OVERLAP;
static final int SUBSET;
static final int SUPERSET;
// Methods
int compareSet (Object other);
}
This interface compares two sets. It has only one method, which compares the sets, and a number of fields that are used to report the result of the set comparison.
int compareSet (Object other);
Compares this set against another, and returns one of the previous results.
Return Value:
Returns one of the field values of this interface.
Parameter | Description |
other
| The set to compare this set against.
|
- DISJOINT
- The sets are disjoint.
- EMPTY
- Both sets are empty sets.
- EMPTY_SUBSET
- This set is empty, and the other set is not empty.
- EMPTY_SUPERSET
- This set is not empty, and the other set is empty.
- EQUAL
- The sets are identical.
- OVERLAP
- The sets overlap.
- SUBSET
- This set is a subset of the other set, and is not equal to the other set.
- SUPERSET
- This set is a superset of the other set, and is not equal to the other set.