Class EvaluationUtils.VariableReplacer
- java.lang.Object
-
- net.ssehub.easy.varModel.cstEvaluation.EvaluationUtils.VariableReplacer
-
- All Implemented Interfaces:
IVersionRestriction.IVariableMapper,CopyVisitor.IVariableReplacer
- Enclosing class:
- EvaluationUtils
static class EvaluationUtils.VariableReplacer extends java.lang.Object implements CopyVisitor.IVariableReplacer
Implements a variable replacer.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AbstractVariable>declsprivate Variableiter
-
Constructor Summary
Constructors Constructor Description VariableReplacer(DecisionVariableDeclaration iter, java.util.List<AbstractVariable> decls)Creates a variable replacer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IVariablemap(IVariable variable)Mapsvariableto its copied version.ConstraintSyntaxTreemapLeaf(Variable variable)Maps a leaf variable.ConstraintSyntaxTreemapSelf(Self self)Maps a leaf node.
-
-
-
Field Detail
-
iter
private Variable iter
-
decls
private java.util.List<AbstractVariable> decls
-
-
Constructor Detail
-
VariableReplacer
VariableReplacer(DecisionVariableDeclaration iter, java.util.List<AbstractVariable> decls)
Creates a variable replacer.- Parameters:
iter- the iter declaration to be replaceddecls- the replacing declarations
-
-
Method Detail
-
map
public IVariable map(IVariable variable)
Description copied from interface:IVersionRestriction.IVariableMapperMapsvariableto its copied version.- Specified by:
mapin interfaceIVersionRestriction.IVariableMapper- Parameters:
variable- the variable- Returns:
- the mapped variable (may be null if there is no mapping)
-
mapLeaf
public ConstraintSyntaxTree mapLeaf(Variable variable)
Description copied from interface:CopyVisitor.IVariableReplacerMaps a leaf variable.- Specified by:
mapLeafin interfaceCopyVisitor.IVariableReplacer- Parameters:
variable- the variable to be mapped- Returns:
- the mapped expression or null if there is no mapping
-
mapSelf
public ConstraintSyntaxTree mapSelf(Self self)
Description copied from interface:CopyVisitor.IVariableReplacerMaps a leaf node.- Specified by:
mapSelfin interfaceCopyVisitor.IVariableReplacer- Parameters:
self- the node to be mapped- Returns:
- the mapped expression or null if there is no mapping
-
-