YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 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 | package org.onosproject.ovsdb.controller; |
| 17 | |
Jian Li | 597d7b2 | 2016-02-29 14:06:55 -0800 | [diff] [blame] | 18 | import org.onlab.util.Identifier; |
| 19 | |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 20 | import static com.google.common.base.Preconditions.checkNotNull; |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 21 | |
| 22 | /** |
BitOhenry | 9b161fb | 2015-10-28 14:59:48 +0800 | [diff] [blame] | 23 | * The class representing an ifaceid. |
| 24 | * This class is immutable. |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 25 | */ |
Jian Li | 597d7b2 | 2016-02-29 14:06:55 -0800 | [diff] [blame] | 26 | public class OvsdbIfaceId extends Identifier<String> { |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 27 | /** |
BitOhenry | 9b161fb | 2015-10-28 14:59:48 +0800 | [diff] [blame] | 28 | * Constructor from a String. |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 29 | * |
| 30 | * @param value the ifaceid to use |
| 31 | */ |
| 32 | public OvsdbIfaceId(String value) { |
Jian Li | 597d7b2 | 2016-02-29 14:06:55 -0800 | [diff] [blame] | 33 | super(checkNotNull(value, "value is not null")); |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | /** |
BitOhenry | 9b161fb | 2015-10-28 14:59:48 +0800 | [diff] [blame] | 37 | * Gets the value of ifaceid. |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 38 | * |
BitOhenry | 9b161fb | 2015-10-28 14:59:48 +0800 | [diff] [blame] | 39 | * @return the value of ifaceid |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 40 | */ |
| 41 | public String value() { |
Jian Li | 597d7b2 | 2016-02-29 14:06:55 -0800 | [diff] [blame] | 42 | return identifier; |
YuanyouZhang | f26445a | 2015-07-22 17:13:18 +0800 | [diff] [blame] | 43 | } |
| 44 | } |