blob: 42309076845207af343b95bd956ba05104e722a8 [file] [log] [blame]
CNlucius74fd4942015-07-20 14:28:04 +08001/*
2 * Copyright 2015 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 */
16package org.onosproject.ovsdb.controller;
17
Jian Li597d7b22016-02-29 14:06:55 -080018import org.onlab.util.Identifier;
19
CNlucius74fd4942015-07-20 14:28:04 +080020import static com.google.common.base.Preconditions.checkNotNull;
CNlucius74fd4942015-07-20 14:28:04 +080021
22/**
BitOhenryd50bf822015-10-26 13:52:57 +080023 * The class representing a datapathid.
24 * This class is immutable.
CNlucius74fd4942015-07-20 14:28:04 +080025 */
Jian Li597d7b22016-02-29 14:06:55 -080026public final class OvsdbDatapathId extends Identifier<String> {
CNlucius74fd4942015-07-20 14:28:04 +080027 /**
BitOhenryd50bf822015-10-26 13:52:57 +080028 * Constructor from a String.
CNlucius74fd4942015-07-20 14:28:04 +080029 *
30 * @param value the datapathid to use
31 */
32 public OvsdbDatapathId(String value) {
Jian Li597d7b22016-02-29 14:06:55 -080033 super(checkNotNull(value, "value is not null"));
CNlucius74fd4942015-07-20 14:28:04 +080034 }
35
36 /**
BitOhenryd50bf822015-10-26 13:52:57 +080037 * Gets the value of datapathid.
CNlucius74fd4942015-07-20 14:28:04 +080038 *
BitOhenryd50bf822015-10-26 13:52:57 +080039 * @return the value of datapathid
CNlucius74fd4942015-07-20 14:28:04 +080040 */
41 public String value() {
Jian Li597d7b22016-02-29 14:06:55 -080042 return identifier;
CNlucius74fd4942015-07-20 14:28:04 +080043 }
44}