Class Variable
- java.lang.Object
-
- com.webcodepro.applecommander.compiler.Variable
-
public class Variable extends java.lang.ObjectContains information referring to a BASIC variable.
-
-
Field Summary
Fields Modifier and Type Field Description static intCONST_FLOATstatic intCONST_INTEGERstatic intCONST_STRINGstatic intTYPE_FLOATstatic intTYPE_INTEGERstatic intTYPE_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.StringgetName()Answers with the variable name.intgetType()Answers with the variable type.java.lang.StringgetValue()Return the value.booleanisConstant()Answers true if this is a constant value.booleanisConstantFloat()Answers true if this is a floating point constant.booleanisConstantInteger()Answers true if this is an integer constant.booleanisConstantString()Answers true if this is a string constant.booleanisNumber()Answers true if this is a number.booleanisTypeFloat()Answers true if this variable is floating point.booleanisTypeInteger()Answers true if this variable is integer.booleanisTypeString()Answers true if this variable is string.booleanisVariableType()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.
-
-