1 55 56 package org.apache.commons.el; 57 58 import java.math.BigDecimal ; 59 import java.math.BigInteger ; 60 61 68 69 public class MinusOperator 70 extends ArithmeticOperator 71 { 72 76 public static final MinusOperator SINGLETON = 77 new MinusOperator (); 78 79 84 public MinusOperator () 85 { 86 } 87 88 95 public String getOperatorSymbol () { 96 return "-"; 97 } 98 99 104 public double apply (double pLeft, double pRight) { 105 return pLeft - pRight; 106 } 107 108 113 public long apply (long pLeft, long pRight) { 114 return pLeft - pRight; 115 } 116 117 119 123 public BigDecimal apply(BigDecimal pLeft, BigDecimal pRight) { 124 return pLeft.subtract(pRight); 125 } 126 127 129 133 public BigInteger apply(BigInteger pLeft, BigInteger pRight) { 134 return pLeft.subtract(pRight); 135 } 136 137 } 139 | Popular Tags |