blob: b8a22a219121d8559f6f96a771ff2a264e6b3bc9 [file] [log] [blame]
Hyunsun Moon699f46b2015-12-04 11:35:25 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Hyunsun Moon699f46b2015-12-04 11:35:25 -08003 *
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 */
Hyunsun Moon7f4ed9d2016-04-14 16:13:42 -070016package org.onosproject.cordvtn.api;
Hyunsun Moon699f46b2015-12-04 11:35:25 -080017
Jian Lid79fb942016-02-29 13:42:23 -080018import org.onlab.util.Identifier;
Hyunsun Moon699f46b2015-12-04 11:35:25 -080019
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080020import static com.google.common.base.Preconditions.checkNotNull;
21
Hyunsun Moon699f46b2015-12-04 11:35:25 -080022/**
23 * Representation of service identifier.
24 */
Jian Lid79fb942016-02-29 13:42:23 -080025public final class CordServiceId extends Identifier<String> {
Hyunsun Moon699f46b2015-12-04 11:35:25 -080026 /**
27 * Default constructor.
28 *
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080029 * @param id service identifier
Hyunsun Moon699f46b2015-12-04 11:35:25 -080030 */
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080031 private CordServiceId(String id) {
Jian Lid79fb942016-02-29 13:42:23 -080032 super(id);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080033 }
34
35 /**
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080036 * Returns the CordServiceId with value.
Hyunsun Moon699f46b2015-12-04 11:35:25 -080037 *
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080038 * @param id service id
39 * @return CordServiceId
Hyunsun Moon699f46b2015-12-04 11:35:25 -080040 */
Hyunsun Moonbfc47d12015-12-07 14:06:28 -080041 public static CordServiceId of(String id) {
42 checkNotNull(id);
43 return new CordServiceId(id);
Hyunsun Moon699f46b2015-12-04 11:35:25 -080044 }
Hyunsun Moon699f46b2015-12-04 11:35:25 -080045}