public class TypeCache.Entry
extends java.lang.Object
#var, which must be substituted
finally with the actual top-level variable.| Modifier and Type | Field and Description |
|---|---|
private java.util.List<TypeCache.ConstraintTemplate> |
constraints |
private java.util.Map<java.lang.String,net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> |
nameMap |
private net.ssehub.easy.varModel.model.AbstractVariable |
origvar |
private java.util.List<TypeCache.Entry> |
parents |
private java.util.Map<net.ssehub.easy.varModel.model.AbstractVariable,net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> |
varMap |
| Modifier | Constructor and Description |
|---|---|
private |
Entry(net.ssehub.easy.varModel.model.AbstractVariable var)
Creates a type cache entry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraint(net.ssehub.easy.reasoning.core.reasoner.ConstraintList target,
boolean first,
net.ssehub.easy.varModel.model.Constraint constraint,
boolean register)
Adds a constraint to this type cache entry.
|
void |
addParent(TypeCache.Entry entry,
TypeCache.IConstraintTarget target,
net.ssehub.easy.varModel.confModel.IDecisionVariable register,
net.ssehub.easy.varModel.model.AbstractVariable var)
Adds a parent to this entry and causes constraint transfer.
|
boolean |
containsMapping(net.ssehub.easy.varModel.model.AbstractVariable var)
Returns whether the current context contains a mapping for
var. |
net.ssehub.easy.varModel.cst.ConstraintSyntaxTree |
getLocalMapping(java.lang.String name,
net.ssehub.easy.varModel.model.AbstractVariable self)
Returns the local mapping for the given variable
name just from the current context. |
net.ssehub.easy.varModel.cst.ConstraintSyntaxTree |
getMapping(net.ssehub.easy.varModel.model.AbstractVariable var,
net.ssehub.easy.varModel.model.AbstractVariable self)
Returns the mapped access expression for
var taking into account all current
contexts of the stack starting with the current top-most one. |
boolean |
hasMapping()
Returns whether this cache entry has a variable-accessor mapping.
|
private net.ssehub.easy.varModel.cst.ConstraintSyntaxTree |
instantiate(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst,
net.ssehub.easy.varModel.model.AbstractVariable var)
Instantiates a the given constraint.
|
java.lang.String |
toString() |
private boolean |
transferConstraints(TypeCache.IConstraintTarget target,
net.ssehub.easy.varModel.confModel.IDecisionVariable register,
net.ssehub.easy.varModel.model.AbstractVariable var)
Transfers constraints.
|
private net.ssehub.easy.varModel.model.AbstractVariable origvar
private java.util.List<TypeCache.ConstraintTemplate> constraints
private java.util.List<TypeCache.Entry> parents
private java.util.Map<net.ssehub.easy.varModel.model.AbstractVariable,net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> varMap
private java.util.Map<java.lang.String,net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> nameMap
private Entry(net.ssehub.easy.varModel.model.AbstractVariable var)
var - the variable the constraint are bound topublic void addConstraint(net.ssehub.easy.reasoning.core.reasoner.ConstraintList target,
boolean first,
net.ssehub.easy.varModel.model.Constraint constraint,
boolean register)
target - the target listfirst - whether the constraint shall be added to front or backconstraint - the constraintregister - shall the constraint be registered in VariablesMappublic boolean hasMapping()
true for mapping, false elsepublic boolean containsMapping(net.ssehub.easy.varModel.model.AbstractVariable var)
var.var - the variable to look fortrue if there is a mapping, false elseprivate net.ssehub.easy.varModel.cst.ConstraintSyntaxTree instantiate(net.ssehub.easy.varModel.cst.ConstraintSyntaxTree cst,
net.ssehub.easy.varModel.model.AbstractVariable var)
cst - the constraintvar - the replacing variablepublic net.ssehub.easy.varModel.cst.ConstraintSyntaxTree getMapping(net.ssehub.easy.varModel.model.AbstractVariable var,
net.ssehub.easy.varModel.model.AbstractVariable self)
var taking into account all current
contexts of the stack starting with the current top-most one. If varMap is present,
performs an on-the-fly instantiation of the mapped accessor. Intended for dynamically building up
the mapping in the context stack.var - the variable to return the mapping forself - the variable to instantiate the stored mapping forpublic net.ssehub.easy.varModel.cst.ConstraintSyntaxTree getLocalMapping(java.lang.String name,
net.ssehub.easy.varModel.model.AbstractVariable self)
name just from the current context. Names are
registered once, to the most local (non-shadowed) variable. If varMap is present,
performs an on-the-fly instantiation of the mapped accessor. Intended for dynamically building up
the mapping in the context stack.name - the name of the variableself - the variable to instantiate the stored mapping forpublic void addParent(TypeCache.Entry entry, TypeCache.IConstraintTarget target, net.ssehub.easy.varModel.confModel.IDecisionVariable register, net.ssehub.easy.varModel.model.AbstractVariable var)
entry - the entrytarget - the constraint targetregister - the variable to register againstvar - the replacing variableprivate boolean transferConstraints(TypeCache.IConstraintTarget target, net.ssehub.easy.varModel.confModel.IDecisionVariable register, net.ssehub.easy.varModel.model.AbstractVariable var)
target - the constraint targetregister - the variable to register againstvar - the replacing variablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009 - 2018 SSE. All Rights Reserved.