public class RangedVariable
extends java.lang.Object
When the range is not null
it means that not all variable is in use
but only it's sub-array.
Constructor and Description |
---|
RangedVariable(ru.ispras.fortress.expression.NodeVariable variable)
Constructs object with the specified variable.
|
RangedVariable(ru.ispras.fortress.expression.NodeVariable variable,
Range range)
Constructs object with the specified variable and it's range.
|
Modifier and Type | Method and Description |
---|---|
RangedVariable |
deepCopy()
Creates a deep copy of the current object.
|
boolean |
equals(java.lang.Object obj) |
Range |
getRange()
Returns range.
|
ru.ispras.fortress.expression.NodeVariable |
getVariable()
Returns variable.
|
java.lang.String |
getVariableName()
Returns variable name.
|
int |
hashCode() |
boolean |
isRanged()
Checks whether this is ranged.
|
void |
setRange(Range range)
Sets new range.
|
java.lang.String |
toString() |
public RangedVariable(ru.ispras.fortress.expression.NodeVariable variable)
variable
- Variable.java.lang.IllegalArgumentException
- when argument is null
.public RangedVariable(ru.ispras.fortress.expression.NodeVariable variable, Range range)
The ranged variable MUST have either bit vector data type or map data type.
variable
- Variable.range
- Range.java.lang.IllegalArgumentException
- in the following situations:
(1) when any of the arguments is null
;
(2) when variable argument is neither of
BitVector
data type
nor of DataMap
data type;
(3) when variable is of BitVector
type
but range old/young bit numbers are out of
BitVector
size;
(4) when variable is of DataMap
type
but range old/young bit numbers are not equal.public RangedVariable deepCopy()
public ru.ispras.fortress.expression.NodeVariable getVariable()
public java.lang.String getVariableName()
public Range getRange()
public void setRange(Range range)
range
- Range to be set.java.lang.IllegalArgumentException
- in the following situations:
(1) when any argument is null
;
(2) when this object's variable is neither of
BitVector
nor of DataMap
data types;
(3) when this object's variable
is of BitVector
type
but range old/young bit numbers are out of
BitVector
size;
(4) when variable is of DataMap
type
but range old/young bit numbers are not equal.public boolean isRanged()
true
if this contains non-null
range, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object