class EquatableValueSet implements ValueSet {

    @Override
    public boolean overlaps(ValueSet other)
    {
        EquatableValueSet otherValueSet = checkCompatibility(other);

        if (inclusive && otherValueSet.inclusive()) {
            return setsOverlap(entries, otherValueSet.entries);
        }
        else if (inclusive) {
            return !otherValueSet.entries.containsAll(entries);
        }
        else if (otherValueSet.inclusive()) {
            return !entries.containsAll(otherValueSet.entries);
        }
        else {
            return true;
        }
    }

    @JsonCreator public  EquatableValueSet(
            @JsonProperty("type") Type type,
            @JsonProperty("inclusive") boolean inclusive,
            @JsonProperty("entries") Set<ValueEntry> entries);

}