|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infix2postfix.OperandManager infix2postfix.NumericOperandManager
This class represents Numeric Operand Manager. Numeric operands like
int,long,float, double etc can be managed by this manager. Numeric operands
in a particular radix systems are also supported. Radix limits defined by
java.lang.Character.MIN_RADIX
and
java.lang.Character.MAX_RADIX
are supported. Default radix
for numbers is assumed to be 10 (decimal system).
Field Summary | |
static int |
DEFAULT_RADIX
Default radix for the numeric operands |
protected int |
radix
Radix for the operands managed by this operand manager |
Fields inherited from class infix2postfix.OperandManager |
varHolder |
Constructor Summary | |
NumericOperandManager()
No-arg constructor. |
|
NumericOperandManager(int radix)
This constructor allows radix specified for the operands for this operand manager. |
|
NumericOperandManager(VariableHolder varHolder)
This constructor accepts custom "variable holder" as argument. |
Method Summary | |
int |
getRadix()
Returns the radix being used by this operand manager. |
void |
setRadix(int radix)
Sets radix for the operands managed by this operand manager. |
Methods inherited from class infix2postfix.OperandManager |
getDefaultVariableHolder, getVariableHolder, getVariableValue, isOperand, isVariable, setVariable, setVariableHolder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_RADIX
protected int radix
Constructor Detail |
public NumericOperandManager()
DEFAULT_RADIX
.
public NumericOperandManager(int radix)
setRadix(int)
public NumericOperandManager(VariableHolder varHolder)
VariableHolder
Method Detail |
public void setRadix(int radix)
java.lang.Character.MIN_RADIX
and
java.lang.Character.MAX_RADIX
. Radix out of this range
is ignored and the existing value of the radix for this object
prevails in that case.
Character.MIN_RADIX
,
Character.MAX_RADIX
public int getRadix()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |