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 MultiplyOperator 70 extends ArithmeticOperator 71 { 72 76 public static final MultiplyOperator SINGLETON = 77 new MultiplyOperator (); 78 79 84 public MultiplyOperator () 85 { 86 } 87 88 95 public String getOperatorSymbol () 96 { 97 return "*"; 98 } 99 100 105 public double apply (double pLeft, 106 double pRight 107 ) 108 { 109 return pLeft * pRight; 110 } 111 112 117 public long apply (long pLeft, 118 long pRight 119 ) 120 { 121 return pLeft * pRight; 122 } 123 124 126 130 public BigDecimal apply(BigDecimal pLeft, 131 BigDecimal pRight 132 ) { 133 return pLeft.multiply(pRight); 134 } 135 136 138 142 public BigInteger apply(BigInteger pLeft, 143 BigInteger pRight 144 ) { 145 return pLeft.multiply(pRight); 146 } 147 148 } 150 | Popular Tags |