Class PVariable
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.psystem.PVariable
-
public class PVariable extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PVariablegetDirectUnifiedInto()java.lang.StringgetName()java.util.Set<PConstraint>getReferringConstraints()<ConstraintType>
java.util.Set<ConstraintType>getReferringConstraintsOfType(java.lang.Class<ConstraintType> constraintClass)PVariablegetUnifiedIntoRoot()booleanisDeducable()Determines whether there are any constraints that can deduce this variablebooleanisUnique()booleanisVirtual()voidrefer(PConstraint constraint)Register that this variable is referred by the given constraint.java.lang.StringtoString()voidunifyInto(PVariable replacement)Replaces this variable with a given other, resulting in their unification.voidunrefer(PConstraint constraint)Register that this variable is no longer referred by the given constraint.
-
-
-
Method Detail
-
unifyInto
public void unifyInto(PVariable replacement)
Replaces this variable with a given other, resulting in their unification. This variable will no longer be unique.- Parameters:
replacement-
-
isDeducable
public boolean isDeducable()
Determines whether there are any constraints that can deduce this variable
-
refer
public void refer(PConstraint constraint)
Register that this variable is referred by the given constraint.- Parameters:
constraint-
-
unrefer
public void unrefer(PConstraint constraint)
Register that this variable is no longer referred by the given constraint.- Parameters:
constraint-
-
getName
public java.lang.String getName()
- Returns:
- the name of the pattern variable. This is the unique key of the pattern node.
-
isVirtual
public boolean isVirtual()
- Returns:
- the virtual
-
getReferringConstraints
public java.util.Set<PConstraint> getReferringConstraints()
- Returns:
- the referringConstraints
-
getReferringConstraintsOfType
public <ConstraintType> java.util.Set<ConstraintType> getReferringConstraintsOfType(java.lang.Class<ConstraintType> constraintClass)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDirectUnifiedInto
public PVariable getDirectUnifiedInto()
-
getUnifiedIntoRoot
public PVariable getUnifiedIntoRoot()
-
isUnique
public boolean isUnique()
-
-