1
2
3
4
5
6
7
8 package org.opendaylight.lispflowmapping.lisp.util;
9
10 public final class NumberUtil {
11
12 private NumberUtil() {
13 }
14
15 public static int asInt(Integer number) {
16 if (number != null) {
17 return number;
18 }
19 return 0;
20 }
21
22 public static byte asByte(Byte number) {
23 if (number != null) {
24 return number;
25 }
26 return 0;
27 }
28
29 public static short asShort(Short number) {
30 if (number != null) {
31 return number;
32 }
33 return 0;
34 }
35
36 public static long asLong(Long number) {
37 if (number != null) {
38 return number;
39 }
40 return 0;
41 }
42
43 }