*/
package org.opendaylight.protocol.pcep.spi;
+import java.io.Serializable;
+
/**
- * Caret for combination of Error-type and Error-value
+ * Caret for combination of Error-type and Error-value.
*/
-final class PCEPErrorIdentifier {
+final class PCEPErrorIdentifier implements Serializable {
+ private static final long serialVersionUID = 2434590156751699872L;
private final short type;
private final short value;
if (this == obj) {
return true;
}
- if (obj == null) {
- return false;
- }
- if (this.getClass() != obj.getClass()) {
+ if (obj == null || this.getClass() != obj.getClass()) {
return false;
}
final PCEPErrorIdentifier other = (PCEPErrorIdentifier) obj;
- if (this.type != other.type) {
- return false;
- }
- if (this.value != other.value) {
- return false;
- }
- return true;
+ return this.type == other.type && this.value == other.value;
}
@Override