Class VerilogRange
- java.lang.Object
-
- ru.ispras.verilog.parser.model.basis.VerilogRange
-
public final class VerilogRange extends java.lang.Object
VerilogRange
represents ranges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VerilogRange.Type
VerilogRange.Type
contains the range types.
-
Constructor Summary
Constructors Constructor Description VerilogRange()
Creates an range.VerilogRange(VerilogRange other)
Creates a copy of the range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VerilogRange
clone()
VerilogExpression
getLeftExpression()
Returns the left expression of the range.VerilogExpression
getRightExpression()
Returns the right expression of the range.VerilogRange.Type
getType()
Returns the type of the range.boolean
isMinus()
Checks whether the range isMINUS
.boolean
isPlus()
Checks whether the range isPLUS
.boolean
isRange()
Checks whether the range isRANGE
.void
setLeftExpression(VerilogExpression lhs)
Sets the left expression of the range.void
setMinus()
Sets the range type toMINUS
.void
setPlus()
Sets the range type toPLUS
.void
setRange()
Sets the range type toRANGE
.void
setRightExpression(VerilogExpression rhs)
Sets the right expression of the range.void
setType(VerilogRange.Type type)
Sets the type of the range.java.lang.String
toString()
-
-
-
Constructor Detail
-
VerilogRange
public VerilogRange()
Creates an range.
-
VerilogRange
public VerilogRange(VerilogRange other)
Creates a copy of the range.- Parameters:
other
- the range to be copied.
-
-
Method Detail
-
getType
public VerilogRange.Type getType()
Returns the type of the range.- Returns:
- the range type.
-
setType
public void setType(VerilogRange.Type type)
Sets the type of the range.- Parameters:
type
- the type to be set.
-
isRange
public boolean isRange()
Checks whether the range isRANGE
.- Returns:
true
iff the range isRANGE
.
-
isPlus
public boolean isPlus()
Checks whether the range isPLUS
.- Returns:
true
iff the range isPLUS
.
-
isMinus
public boolean isMinus()
Checks whether the range isMINUS
.- Returns:
true
if the range isMINUS
.
-
setRange
public void setRange()
Sets the range type toRANGE
.
-
setPlus
public void setPlus()
Sets the range type toPLUS
.
-
setMinus
public void setMinus()
Sets the range type toMINUS
.
-
getLeftExpression
public VerilogExpression getLeftExpression()
Returns the left expression of the range.- Returns:
- the left expression.
-
setLeftExpression
public void setLeftExpression(VerilogExpression lhs)
Sets the left expression of the range.- Parameters:
lhs
- the left expression to be set.
-
getRightExpression
public VerilogExpression getRightExpression()
Returns the right expression of the range.- Returns:
- the right expression.
-
setRightExpression
public void setRightExpression(VerilogExpression rhs)
Sets the right expression of the range.- Parameters:
rhs
- the right expression to be set.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
clone
public VerilogRange clone()
- Overrides:
clone
in classjava.lang.Object
-
-