org.peaseplate.internal.lang.command
Class AbstractNumericCommand
java.lang.Object
org.peaseplate.internal.lang.command.AbstractCommand
org.peaseplate.internal.lang.command.AbstractDoubleParameterCommand
org.peaseplate.internal.lang.command.AbstractNumericCommand
- All Implemented Interfaces:
- ICommand
- Direct Known Subclasses:
- AdditionCommand, BitwiseAndCommand, BitwiseExclusiveOrCommand, BitwiseInclusiveOrCommand, DivideCommand, ModuloCommand, MultiplyCommand, ShiftLeftCommand, ShiftRightCommand, SubstractCommand, UnsignedShiftRightCommand
public abstract class AbstractNumericCommand
- extends AbstractDoubleParameterCommand
Method Summary |
java.math.BigDecimal |
calculate(java.math.BigDecimal left,
java.math.BigDecimal right)
|
java.math.BigInteger |
calculate(java.math.BigInteger left,
java.math.BigInteger right)
|
java.lang.Byte |
calculate(java.lang.Byte left,
java.lang.Byte right)
|
java.lang.Character |
calculate(java.lang.Character left,
java.lang.Character right)
|
java.lang.Double |
calculate(java.lang.Double left,
java.lang.Double right)
|
java.lang.Float |
calculate(java.lang.Float left,
java.lang.Float right)
|
java.lang.Integer |
calculate(java.lang.Integer left,
java.lang.Integer right)
|
java.lang.Long |
calculate(java.lang.Long left,
java.lang.Long right)
|
java.lang.Object |
calculate(java.lang.Object left,
java.lang.Object right)
|
java.lang.Short |
calculate(java.lang.Short left,
java.lang.Short right)
|
java.lang.StringBuffer |
calculate(java.lang.StringBuffer left,
java.lang.StringBuffer right)
|
java.lang.StringBuilder |
calculate(java.lang.StringBuilder left,
java.lang.StringBuilder right)
|
java.lang.String |
calculate(java.lang.String left,
java.lang.String right)
|
java.lang.Object |
call(BuildContext context)
|
abstract java.lang.String |
getSign()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractNumericCommand
public AbstractNumericCommand(TemplateLocator locator,
int line,
int column,
ICommand leftCommand,
ICommand rightCommand)
getSign
public abstract java.lang.String getSign()
call
public java.lang.Object call(BuildContext context)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Byte calculate(java.lang.Byte left,
java.lang.Byte right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Short calculate(java.lang.Short left,
java.lang.Short right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Character calculate(java.lang.Character left,
java.lang.Character right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Integer calculate(java.lang.Integer left,
java.lang.Integer right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Long calculate(java.lang.Long left,
java.lang.Long right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Float calculate(java.lang.Float left,
java.lang.Float right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Double calculate(java.lang.Double left,
java.lang.Double right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.math.BigInteger calculate(java.math.BigInteger left,
java.math.BigInteger right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.math.BigDecimal calculate(java.math.BigDecimal left,
java.math.BigDecimal right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.String calculate(java.lang.String left,
java.lang.String right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.StringBuffer calculate(java.lang.StringBuffer left,
java.lang.StringBuffer right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.StringBuilder calculate(java.lang.StringBuilder left,
java.lang.StringBuilder right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
calculate
public java.lang.Object calculate(java.lang.Object left,
java.lang.Object right)
throws TemplateRuntimeException
- Throws:
TemplateRuntimeException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2008. All Rights Reserved.