blob: 99d7f692dd3e2125407eeeff19618feb8f7c0e33 [file] [log] [blame]
Thomas Vachuska58de4162015-09-10 16:15:33 -07001/*
Thomas Vachuska52f2cd12018-11-08 21:20:04 -08002 * Copyright 2018-present Open Networking Foundation
Thomas Vachuska58de4162015-09-10 16:15:33 -07003 *
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 */
Brian O'Connor6de2e202015-05-21 14:30:41 -070016package org.onosproject.incubator.net.resource.label;
17
Brian O'Connor893b9222015-06-25 15:07:04 -040018import com.google.common.annotations.Beta;
Jian Lib6d998e2016-02-29 11:41:18 -080019import org.onlab.util.Identifier;
jccfff0de92015-03-28 01:40:08 -070020
jccfff0de92015-03-28 01:40:08 -070021/**
22 * Representation of a label.
23 */
Brian O'Connor893b9222015-06-25 15:07:04 -040024@Beta
Sho SHIMIZU73aae6c2016-02-22 20:23:32 -080025public final class LabelResourceId extends Identifier<Long> {
jccfff0de92015-03-28 01:40:08 -070026
Jian Lib6d998e2016-02-29 11:41:18 -080027 /**
28 * Creates a new label identifier.
29 *
30 * @param labelResourceId backing identifier value
31 * @return label identifier
32 */
jccfff0de92015-03-28 01:40:08 -070033 public static LabelResourceId labelResourceId(long labelResourceId) {
34 return new LabelResourceId(labelResourceId);
35 }
36
37 // Public construction is prohibited
38 private LabelResourceId(long labelId) {
Jian Lib6d998e2016-02-29 11:41:18 -080039 super(labelId);
jccfff0de92015-03-28 01:40:08 -070040 }
41
Jian Lib6d998e2016-02-29 11:41:18 -080042 /**
43 * Returns label identifier.
44 *
45 * @return label identifier
46 */
jccfff0de92015-03-28 01:40:08 -070047 public long labelId() {
Jian Lib6d998e2016-02-29 11:41:18 -080048 return identifier;
jccfff0de92015-03-28 01:40:08 -070049 }
jccfff0de92015-03-28 01:40:08 -070050}