1
2
3
4
5 package test.crispy.example.service;
6
7 /**
8 * @author Linke
9 *
10 */
11 public class CalculatorImpl implements Calculator {
12
13 /**
14 * @see test.crispy.example.service.Calculator#add(java.lang.Integer, java.lang.Integer)
15 */
16 public int add(int a, int b) { return a + b; }
17
18 /**
19 * @see test.crispy.example.service.Calculator#add(java.lang.Long, java.lang.Long)
20 */
21 public long add (long a, long b) { return a + b; }
22
23 /**
24 * @see test.crispy.example.service.Calculator#add(java.lang.Long, java.lang.Long)
25 */
26 public double add (double a, double b) { return a + b; }
27
28 /**
29 * @see test.crispy.example.service.Calculator#subtract(java.lang.Integer, java.lang.Integer)
30 */
31 public int subtract(int pvA, int pvB) {
32 return pvA - pvB;
33 }
34
35 public Long addLong (Long a, Long b) {
36 if (a == null || b == null) {
37 return null;
38 } else {
39 return new Long(a.longValue() + b.longValue());
40 }
41 }
42
43
44
45 }