public class PlusOperator extends ArithmeticOperator
The implementation of the plus operator
Modifier and Type | Field | Description |
---|---|---|
static PlusOperator |
SINGLETON |
Constructor | Description |
---|---|
PlusOperator() |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
double |
apply(double pLeft,
double pRight) |
Applies the operator to the given double values, returning a double
|
long |
apply(long pLeft,
long pRight) |
Applies the operator to the given double values, returning a double
|
java.math.BigDecimal |
apply(java.math.BigDecimal pLeft,
java.math.BigDecimal pRight) |
Applies the operator to the given BigDecimal values, returning a
BigDecimal.
|
java.math.BigInteger |
apply(java.math.BigInteger pLeft,
java.math.BigInteger pRight) |
Applies the operator to the given BigInteger values, returning a
BigInteger.
|
java.lang.String |
getOperatorSymbol() |
Returns the symbol representing the operator
|
apply
shouldCoerceToBoolean, shouldEvaluate
public static final PlusOperator SINGLETON
public java.lang.String getOperatorSymbol()
getOperatorSymbol
in class BinaryOperator
public double apply(double pLeft, double pRight)
apply
in class ArithmeticOperator
public long apply(long pLeft, long pRight)
apply
in class ArithmeticOperator
public java.math.BigDecimal apply(java.math.BigDecimal pLeft, java.math.BigDecimal pRight)
apply
in class ArithmeticOperator
public java.math.BigInteger apply(java.math.BigInteger pLeft, java.math.BigInteger pRight)
apply
in class ArithmeticOperator
Copyright (c) 2001-2002 - Apache Software Foundation