blob: 39b2a9d0f6233c140126e28a59a24a2441dfdaed [file] [log] [blame]
Satish Kf6d87cb2015-11-30 19:59:22 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Satish Kf6d87cb2015-11-30 19:59:22 +05303 *
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.iptopology.api;
17
Jian Lid79fb942016-02-29 13:42:23 -080018import org.onlab.util.Identifier;
Satish Kf6d87cb2015-11-30 19:59:22 +053019
20/**
21 * Represents Multi-Topology IDs for a network link, node or prefix.
22 */
Jian Lid79fb942016-02-29 13:42:23 -080023public class TopologyId extends Identifier<Short> {
Satish Kf6d87cb2015-11-30 19:59:22 +053024 /**
25 * Constructor to initialize its parameter.
26 *
27 * @param topologyId topology id for node/link/prefix
28 */
29 public TopologyId(short topologyId) {
Jian Lid79fb942016-02-29 13:42:23 -080030 super(topologyId);
Satish Kf6d87cb2015-11-30 19:59:22 +053031 }
32
33 /**
34 * Obtains the topology ID.
35 *
36 * @return topology ID
37 */
38 public short topologyId() {
Jian Lid79fb942016-02-29 13:42:23 -080039 return identifier;
Satish Kf6d87cb2015-11-30 19:59:22 +053040 }
41}