blob: a5a297e6abb20bebd7374192c4620995fad71465 [file] [log] [blame]
tome33cc1a2014-08-25 21:59:41 -07001package org.onlab.onos.provider;
tom0eb04ca2014-08-25 14:34:51 -07002
3/**
4 * Notion of provider identity.
5 */
6public class ProviderId {
7
8 private final String id;
9
10 public ProviderId(String id) {
11 this.id = id;
12 }
13
14 @Override
15 public boolean equals(Object o) {
16 if (this == o) {
17 return true;
18 }
19 if (o == null || getClass() != o.getClass()) {
20 return false;
21 }
22
23 ProviderId that = (ProviderId) o;
24
25 if (!id.equals(that.id)) {
26 return false;
27 }
28
29 return true;
30 }
31
32 @Override
33 public int hashCode() {
34 return id.hashCode();
35 }
36
37 @Override
38 public String toString() {
39 return "ProviderId{" +
40 "id='" + id + '\'' +
41 '}';
42 }
43}