Move integration tests to mdsal-it-parent
[lispflowmapping.git] / mappingservice / yangmodel / src / main / java / org / opendaylight / lispflowmapping / lisp / util / NumberUtil.java
1 /*
2  * Copyright (c) 2014 Contextream, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.lispflowmapping.lisp.util;
9
10 public class NumberUtil {
11
12     public static int asInt(Integer number) {
13         if (number != null) {
14             return number;
15         }
16         return 0;
17     }
18
19     public static byte asByte(Byte number) {
20         if (number != null) {
21             return number;
22         }
23         return 0;
24     }
25
26     public static short asShort(Short number) {
27         if (number != null) {
28             return number;
29         }
30         return 0;
31     }
32
33     public static long asLong(Long number) {
34         if (number != null) {
35             return number;
36         }
37         return 0;
38     }
39
40 }