de.upb.hni.vmagic.literal
Class PhysicalLiteral

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.expression.Expression
          extended by de.upb.hni.vmagic.expression.Primary
              extended by de.upb.hni.vmagic.expression.Literal
                  extended by de.upb.hni.vmagic.literal.PhysicalLiteral
All Implemented Interfaces:
Choice

public class PhysicalLiteral
extends Literal

Physical literal.


Constructor Summary
PhysicalLiteral(java.lang.String unit)
          Creates a physical literal containing only a unit.
PhysicalLiteral(java.lang.String value, java.lang.String unit)
          Creates a physical literal.
 
Method Summary
 SubtypeIndication getType()
          Returns the type of this expression.
 java.lang.String getUnit()
          Returns the unit.
 java.lang.String getValue()
          Returns the value.
 void setUnit(java.lang.String unit)
          Sets the unit.
 void setValue(java.lang.String value)
          Sets the value.
 java.lang.String toString()
           
 
Methods inherited from class de.upb.hni.vmagic.expression.Primary
getPrecedence
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhysicalLiteral

public PhysicalLiteral(java.lang.String unit)
Creates a physical literal containing only a unit.

Parameters:
unit - the unit

PhysicalLiteral

public PhysicalLiteral(java.lang.String value,
                       java.lang.String unit)
Creates a physical literal.

Parameters:
value - the value
unit - the unit
Method Detail

getUnit

public java.lang.String getUnit()
Returns the unit.

Returns:
the unit

setUnit

public void setUnit(java.lang.String unit)
Sets the unit.

Parameters:
unit - the unit

getValue

public java.lang.String getValue()
Returns the value.

Returns:
the value

setValue

public void setValue(java.lang.String value)
Sets the value.

Parameters:
value - the value

getType

public SubtypeIndication getType()
Description copied from class: Expression
Returns the type of this expression.

Specified by:
getType in class Expression
Returns:
the type of this expression

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object