-/*\r
- * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-package org.opendaylight.openflowjava.protocol.api.extensibility;\r
-\r
-/**\r
- * @author michal.polkorab\r
- */\r
-public class MessageCodeKey {\r
-\r
- private short msgVersion;\r
- private int msgType;\r
- private Class<?> clazz;\r
-\r
- /**\r
- * Constructor\r
- * @param version wire protocol version\r
- * @param value used as distinguisher (read from binary data / buffer)\r
- * @param clazz class of object that is going to be deserialized\r
- */\r
- public MessageCodeKey(short version, int value, Class<?> clazz) {\r
- this.msgVersion = version;\r
- this.msgType = value;\r
- this.clazz = clazz;\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- final int prime = 31;\r
- int result = 1;\r
- result = prime * result + ((clazz == null) ? 0 : clazz.hashCode());\r
- result = prime * result + msgType;\r
- result = prime * result + msgVersion;\r
- return result;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj) {\r
- return true;\r
- }\r
- if (obj == null) {\r
- return false;\r
- }\r
- if (!(obj instanceof MessageCodeKey)) {\r
- return false;\r
- }\r
- MessageCodeKey other = (MessageCodeKey) obj;\r
- if (clazz == null) {\r
- if (other.clazz != null) {\r
- return false;\r
- }\r
- } else if (!clazz.equals(other.clazz)) {\r
- return false;\r
- }\r
- if (msgType != other.msgType) {\r
- return false;\r
- }\r
- if (msgVersion != other.msgVersion) {\r
- return false;\r
- }\r
- return true;\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return "msgVersion: " + msgVersion + " objectClass: " + clazz.getName() + " msgType: " + msgType;\r
- }\r
+/*
+ * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.openflowjava.protocol.api.extensibility;
+
+/**
+ * @author michal.polkorab
+ */
+public class MessageCodeKey {
+
+ private short msgVersion;
+ private int msgType;
+ private Class<?> clazz;
+
+ /**
+ * Constructor
+ * @param version wire protocol version
+ * @param value used as distinguisher (read from binary data / buffer)
+ * @param clazz class of object that is going to be deserialized
+ */
+ public MessageCodeKey(short version, int value, Class<?> clazz) {
+ this.msgVersion = version;
+ this.msgType = value;
+ this.clazz = clazz;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((clazz == null) ? 0 : clazz.hashCode());
+ result = prime * result + msgType;
+ result = prime * result + msgVersion;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (!(obj instanceof MessageCodeKey)) {
+ return false;
+ }
+ MessageCodeKey other = (MessageCodeKey) obj;
+ if (clazz == null) {
+ if (other.clazz != null) {
+ return false;
+ }
+ } else if (!clazz.equals(other.clazz)) {
+ return false;
+ }
+ if (msgType != other.msgType) {
+ return false;
+ }
+ if (msgVersion != other.msgVersion) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "msgVersion: " + msgVersion + " objectClass: " + clazz.getName() + " msgType: " + msgType;
+ }
}
\ No newline at end of file