Merge "Add missing copyright text"
[controller.git] / opendaylight / commons / liblldp / src / main / java / org / opendaylight / controller / liblldp / CustomTLVKey.java
1 /**
2  *
3  */
4 package org.opendaylight.controller.liblldp;
5
6 public class CustomTLVKey {
7
8     private int oui;
9     private byte subtype;
10
11     /**
12      * @param oui
13      * @param subtype
14      */
15     public CustomTLVKey(int oui, byte subtype) {
16         this.oui = oui;
17         this.subtype = subtype;
18     }
19
20     /**
21      * @return the oui
22      */
23     public int getOui() {
24         return oui;
25     }
26     /**
27      * @return the subtype
28      */
29     public byte getSubtype() {
30         return subtype;
31     }
32
33     @Override
34     public int hashCode() {
35         final int prime = 31;
36         int result = 1;
37         result = prime * result + oui;
38         result = prime * result + subtype;
39         return result;
40     }
41
42     @Override
43     public boolean equals(Object obj) {
44         if (this == obj) {
45             return true;
46         }
47
48         if (obj == null) {
49             return false;
50         }
51
52         if (getClass() != obj.getClass()) {
53             return false;
54         }
55
56         CustomTLVKey other = (CustomTLVKey) obj;
57         if (oui != other.oui) {
58             return false;
59         }
60
61         if (subtype != other.subtype) {
62             return false;
63         }
64
65         return true;
66     }
67
68
69 }