public class Operand extends Token
Operand
class represents the operands in the expression.Constructor and Description |
---|
Operand(double value)
Parameterized constructor.
|
Operand(String value)
Parameterized constructor.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isOperand(String op)
Utility method to determine if a string is an operand.
|
double |
toDouble()
Convert operand String to double.
|
public Operand(String value)
value
- The double value operand as a Stringpublic Operand(double value)
value
- The double value operandpublic double toDouble()
public static boolean isOperand(String op)
op
- Operand value as a stringCopyright © 2019 Pratanu Mandal. All rights reserved.