Class Variable


  • public class Variable
    extends java.lang.Object
    Contains information referring to a BASIC variable.
    • Constructor Summary

      Constructors 
      Constructor Description
      Variable​(java.lang.String name, int type, java.lang.String value)
      Construct a Variable.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Answers with the variable name.
      int getType()
      Answers with the variable type.
      java.lang.String getValue()
      Return the value.
      boolean isConstant()
      Answers true if this is a constant value.
      boolean isConstantFloat()
      Answers true if this is a floating point constant.
      boolean isConstantInteger()
      Answers true if this is an integer constant.
      boolean isConstantString()
      Answers true if this is a string constant.
      boolean isNumber()
      Answers true if this is a number.
      boolean isTypeFloat()
      Answers true if this variable is floating point.
      boolean isTypeInteger()
      Answers true if this variable is integer.
      boolean isTypeString()
      Answers true if this variable is string.
      boolean isVariableType()
      Answers true if this is a variable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Variable

        public Variable​(java.lang.String name,
                        int type,
                        java.lang.String value)
        Construct a Variable.
    • Method Detail

      • getName

        public java.lang.String getName()
        Answers with the variable name.
      • getType

        public int getType()
        Answers with the variable type.
      • isTypeString

        public boolean isTypeString()
        Answers true if this variable is string.
      • isTypeInteger

        public boolean isTypeInteger()
        Answers true if this variable is integer.
      • isTypeFloat

        public boolean isTypeFloat()
        Answers true if this variable is floating point.
      • isVariableType

        public boolean isVariableType()
        Answers true if this is a variable.
      • isNumber

        public boolean isNumber()
        Answers true if this is a number.
      • isConstantString

        public boolean isConstantString()
        Answers true if this is a string constant.
      • isConstantInteger

        public boolean isConstantInteger()
        Answers true if this is an integer constant.
      • isConstantFloat

        public boolean isConstantFloat()
        Answers true if this is a floating point constant.
      • isConstant

        public boolean isConstant()
        Answers true if this is a constant value.
      • getValue

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