Mahesh Poojary S | a4df1aa | 2016-05-13 08:53:53 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.pce.pceservice; |
| 18 | |
| 19 | /** |
| 20 | * Describes about Label type. |
| 21 | */ |
| 22 | public enum LabelType { |
| 23 | /** |
| 24 | * Signifies in label id of a device. |
| 25 | */ |
| 26 | OUT_LABEL(0), |
| 27 | |
| 28 | /** |
| 29 | * Signifies out label id of a device. |
| 30 | */ |
| 31 | IN_LABEL(1); |
| 32 | |
| 33 | int value; |
| 34 | |
| 35 | /** |
| 36 | * Assign val with the value as the Label type. |
| 37 | * |
| 38 | * @param val Label type |
| 39 | */ |
| 40 | LabelType(int val) { |
| 41 | value = val; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Returns value of Label type. |
| 46 | * |
| 47 | * @return label type |
| 48 | */ |
| 49 | public byte type() { |
| 50 | return (byte) value; |
| 51 | } |
| 52 | } |