Class Variable
- java.lang.Object
-
- com.webcodepro.applecommander.compiler.Variable
-
public class Variable extends java.lang.Object
Contains information referring to a BASIC variable.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONST_FLOAT
static int
CONST_INTEGER
static int
CONST_STRING
static int
TYPE_FLOAT
static int
TYPE_INTEGER
static int
TYPE_STRING
-
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.
-
-
-
Field Detail
-
TYPE_STRING
public static final int TYPE_STRING
- See Also:
- Constant Field Values
-
TYPE_INTEGER
public static final int TYPE_INTEGER
- See Also:
- Constant Field Values
-
TYPE_FLOAT
public static final int TYPE_FLOAT
- See Also:
- Constant Field Values
-
CONST_STRING
public static final int CONST_STRING
- See Also:
- Constant Field Values
-
CONST_INTEGER
public static final int CONST_INTEGER
- See Also:
- Constant Field Values
-
CONST_FLOAT
public static final int CONST_FLOAT
- See Also:
- Constant Field Values
-
-
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.
-
-