1 package org.onosproject.incubator.net.resource.label;
3 import com.google.common.annotations.Beta;
4 import org.onosproject.net.resource.ResourceId;
6 import java.util.Objects;
9 * Representation of a label.
12 public final class LabelResourceId implements ResourceId {
16 public static LabelResourceId labelResourceId(long labelResourceId) {
17 return new LabelResourceId(labelResourceId);
20 // Public construction is prohibited
21 private LabelResourceId(long labelId) {
22 this.labelId = labelId;
25 public long labelId() {
30 public int hashCode() {
31 return Objects.hashCode(labelId);
35 public boolean equals(Object obj) {
36 if (obj instanceof LabelResourceId) {
37 LabelResourceId that = (LabelResourceId) obj;
38 return Objects.equals(this.labelId, that.labelId);
44 public String toString() {
45 return String.valueOf(this.labelId);