blob: 49263732cb755d356c6002c5b4eab68b8227bc6f [file] [log] [blame]
Naoki Shiota5a056062016-05-05 18:43:59 -07001/*
2 * Copyright 2016 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.newoptical.api;
17
18import com.google.common.annotations.Beta;
19import com.google.common.base.MoreObjects;
20import org.onlab.util.Identifier;
21
22// TODO: After ResourceManager is made to accept app-defined ResourceConsumer,
23// this class should be implemented as ResourceConsumer.
24/**
25 * ID for optical connectivity.
26 */
27@Beta
28public final class OpticalConnectivityId extends Identifier<Long> {
29
30 public static OpticalConnectivityId of(long value) {
31 return new OpticalConnectivityId(value);
32 }
33
34 OpticalConnectivityId(long value) {
35 super(value);
36 }
37
38 @Override
39 public String toString() {
40 return MoreObjects.toStringHelper(this)
41 .add("value", id())
42 .toString();
43 }
44}