Package mepk.kernel
Class DVRSet
java.lang.Object
mepk.kernel.DVRSet
A set of 'distinct variable restrictions', each of which is an unordered pair
of different variable names. DVR sets are values: they cannot be modified
after they have been created. They are
equal if (and
only if) they have the same structure. It is only possible to create
instances using the methods in this class.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionandDistinct(String... varNames) Create a new DVR set by adding a DVR for each pair of the given variable names.andDistinct(DVRSet addedDVRs) Create a new DVR set by adding the given DVRs.static DVRSetCreate the union of multiple DVRSets.static DVRSetCreate a DVRSet.static DVRSetCreate a DVRSet.booleaninthashCode()substitute(String replacedVarName, Iterable<String> replacementVarNames) Replace the given variable name by the given set of variable names.toString()
-
Field Details
-
EMPTY
The empty DVRSet.
-
-
Method Details
-
Distinct
Create a DVRSet.- Parameters:
varNames- the distinct variables- Returns:
- the set
-
Distinct
Create a DVRSet.- Parameters:
varNames- the distinct variables- Returns:
- the set
-
Distinct
Create the union of multiple DVRSets.- Parameters:
dvrSets- the DVRSets to be merged- Returns:
- the union DVRSet
-
hashCode
public int hashCode() -
equals
-
substitute
Replace the given variable name by the given set of variable names.- Parameters:
replacedVarName- the variable name to be replacedreplacementVarNames- the replacing variable names- Returns:
- the new DVR set
-
andDistinct
Create a new DVR set by adding the given DVRs.- Parameters:
addedDVRs- the DVRs to be added- Returns:
- the new DVR set
-
andDistinct
Create a new DVR set by adding a DVR for each pair of the given variable names.- Parameters:
varNames- the variables which should be distinct.- Returns:
- the new DVR set
-
toString
-