blob: eaf7ac11c0fb6d0f57d94244cf2d1bbe0f2d416d [file] [log] [blame]
Hyunsun Moon4c396632016-05-13 04:17:53 -07001/*
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 */
16package org.onosproject.xosclient.api;
17
18import com.google.common.base.Strings;
19import org.onlab.util.Identifier;
20
21import static com.google.common.base.Preconditions.checkArgument;
22
23/**
24 * Representation of VTN port ID.
25 */
26public final class VtnPortId extends Identifier<String> {
27
28 private VtnPortId(String id) {
29 super(id);
30 }
31
32 /**
33 * Returns vtn port identifier with value.
34 *
35 * @param id id
36 * @return instance port id
37 */
38 public static VtnPortId of(String id) {
Hyunsun Moon65040992016-07-27 18:41:34 -070039 checkArgument(!Strings.isNullOrEmpty(id), "VTN port ID cannot be null");
Hyunsun Moon4c396632016-05-13 04:17:53 -070040 return new VtnPortId(id);
41 }
42}