public class Declaration
extends java.lang.Object
The variable declaration includes an invariant (a condition, to that at every moment variable value must meet) and an initial value.
Constructor and Description |
---|
Declaration(ru.ispras.fortress.expression.Node initialValue,
Range invariant)
Constructs an object with the specified initial value and it's invariant.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsInitialValue()
Checks whether object contains it's initial value.
|
boolean |
containsInvariant()
Checks whether object contains invariant.
|
ru.ispras.fortress.expression.Node |
getInitialValue()
Returns initial value of declared variable.
|
Range |
getInvariant()
Returns variable invariant.
|
public Declaration(ru.ispras.fortress.expression.Node initialValue, Range invariant)
initialValue
- Initial value of the specified variable.invariant
- Invariant og the specified variable.java.lang.NullPointerException
- when variable argument is null
.public boolean containsInvariant()
true
if there is not-null invariant in this object,
false
otherwise.public boolean containsInitialValue()
true
if there is not-null initial value in this object,
false
otherwise.public Range getInvariant()
public ru.ispras.fortress.expression.Node getInitialValue()