public class PlusOperator extends ArithmeticOperator
The implementation of the plus operator
Modifier and Type | Field and Description |
---|---|
static PlusOperator |
SINGLETON |
Constructor and Description |
---|
PlusOperator()
Constructor
|
Modifier and Type | Method and Description |
---|---|
BigDecimal |
apply(BigDecimal pLeft,
BigDecimal pRight)
Applies the operator to the given BigDecimal values, returning a
BigDecimal.
|
BigInteger |
apply(BigInteger pLeft,
BigInteger pRight)
Applies the operator to the given BigInteger values, returning a
BigInteger.
|
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
|
String |
getOperatorSymbol()
Returns the symbol representing the operator
|
apply
shouldCoerceToBoolean, shouldEvaluate
public static final PlusOperator SINGLETON
public PlusOperator()
public 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 BigDecimal apply(BigDecimal pLeft, BigDecimal pRight)
apply
in class ArithmeticOperator
public BigInteger apply(BigInteger pLeft, BigInteger pRight)
apply
in class ArithmeticOperator
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.