blob: 293cbdbad8dcf02cb01a1dd807b4fe7a320f049b [file] [log] [blame]
Jonghwan Hyun722275f2018-05-14 15:44:56 -07001/*
2 * Copyright 2018-present Open Networking Foundation
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.inbandtelemetry.api;
17
18import org.onlab.util.Identifier;
19
20/**
21 * Representation of a IntIntent ID.
22 */
23public final class IntIntentId extends Identifier<Long> {
24 private IntIntentId(long id) {
25 super(id);
26 }
27
28 /**
29 * Creates an IntIntent ID from a given long value.
30 *
31 * @param id long value
32 * @return IntIntent ID
33 */
34 public static IntIntentId valueOf(long id) {
35 return new IntIntentId(id);
36 }
37
38 /**
39 * Gets the IntIntent ID value.
40 *
41 * @return IntIntent ID value as long
42 */
43 public long value() {
44 return this.identifier;
45 }
46
47 @Override
48 public String toString() {
49 return Long.toHexString(this.identifier);
50 }
51}