blob: 3f29bac05bf3be06afa1f4c05e324eb0a0838484 [file] [log] [blame]
alshabib1f44e8e2014-08-14 15:19:57 -07001package net.onrc.onos.api;
2
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}