public final class VersionRegistry
extends java.lang.Object
Constructor and Description |
---|
VersionRegistry()
Constructs a registry.
|
Modifier and Type | Method and Description |
---|---|
void |
addVersions(Versions vars)
Adds the specified versions container to the registry.
|
java.util.Map<ru.ispras.fortress.expression.NodeVariable,ru.ispras.fortress.expression.Node> |
collectAssignments(ru.ispras.fortress.expression.NodeVariable original,
ru.ispras.fortress.expression.NodeVariable rhs)
Searches for and assigns the values of the specified right-hand side variable to the specified
original variable.
|
boolean |
contains(ru.ispras.fortress.expression.NodeVariable variable)
Indicates whether the registry contains the specified variable.
|
java.util.Collection<ru.ispras.fortress.expression.NodeVariable> |
getAllVersions()
Returns all versions of all variables.
|
java.util.List<ru.ispras.fortress.expression.Node> |
getValues(ru.ispras.fortress.expression.NodeVariable variable)
Returns the current values of the specifed variable.
|
Versions |
getVersions(ru.ispras.fortress.expression.NodeVariable originalVariable)
Returns the versions container of the specified variable.
|
void |
initAllValues()
Inits the contents of the registry.
|
void |
updateValue(ru.ispras.fortress.expression.NodeVariable variable,
int index,
ru.ispras.fortress.expression.Node value)
Updates the value of the specified variable.
|
public void addVersions(Versions vars)
vars
- - the specified Versions
object.public java.util.List<ru.ispras.fortress.expression.Node> getValues(ru.ispras.fortress.expression.NodeVariable variable)
variable
- - the specifed variable.null
if the specified variable does not belong to this registry, a list of
current values otherwise.public boolean contains(ru.ispras.fortress.expression.NodeVariable variable)
variable
- - the specified variable.true
if the registry contains the specified variable, false
otherwise.public Versions getVersions(ru.ispras.fortress.expression.NodeVariable originalVariable)
originalVariable
- - the specified variable.Versions
container if the registry contains the specified variable,
null
otherwise.public void initAllValues()
public void updateValue(ru.ispras.fortress.expression.NodeVariable variable, int index, ru.ispras.fortress.expression.Node value)
variable
- - the specified variable.index
- - the specified index of the value.value
- - the specified value.public java.util.Collection<ru.ispras.fortress.expression.NodeVariable> getAllVersions()
public java.util.Map<ru.ispras.fortress.expression.NodeVariable,ru.ispras.fortress.expression.Node> collectAssignments(ru.ispras.fortress.expression.NodeVariable original, ru.ispras.fortress.expression.NodeVariable rhs)
original
- - the left-hand side of the assignment.rhs
- - the right-hand side of the assignment.