ignore transiant files in git
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / type / lisp / LispMessageEnum.java
1 /*
2  * Copyright (c) 2013 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
9 package org.opendaylight.lispflowmapping.type.lisp;
10
11 public enum LispMessageEnum {
12     MapRequest((byte) 1), //
13     MapReply((byte) 2), //
14     MapRegister((byte) 3), //
15     MapNotify((byte) 4), //
16     EncapsulatedControlMessage((byte) 8);
17
18     private byte value;
19
20     private LispMessageEnum(byte value) {
21         this.value = value;
22     }
23
24     public byte getValue() {
25         return value;
26     }
27
28     public static LispMessageEnum valueOf(byte i) {
29         for (LispMessageEnum lme : LispMessageEnum.values()) {
30             if (lme.getValue() == i) {
31                 return lme;
32             }
33         }
34         return null;
35     }
36 }