-/*\r
- * Copyright (c) 2014 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
-\r
-package org.opendaylight.openflowjava.protocol.api.keys;\r
-\r
-import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;\r
-import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterSerializerKey;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;\r
-\r
-/**\r
- * @author michal.polkorab\r
- * @param <OXM_CLASS> oxm_class (see specification)\r
- * @param <OXM_FIELD> oxm_field (see specification)\r
- */\r
-public final class MatchEntrySerializerKey<OXM_CLASS extends OxmClassBase, OXM_FIELD extends MatchField>\r
- extends MessageTypeKey<MatchEntries> implements ExperimenterSerializerKey {\r
-\r
- private Class<OXM_CLASS> oxmClass;\r
- private Class<OXM_FIELD> oxmField;\r
- private Long experimenterId;\r
-\r
- /**\r
- * @param msgVersion protocol wire version\r
- * @param objectType class of serialized object\r
- * @param oxmClass oxm_class (see specification)\r
- * @param oxmField oxm_field (see specification)\r
- */\r
- public MatchEntrySerializerKey(short msgVersion, Class<OXM_CLASS> oxmClass,\r
- Class<OXM_FIELD> oxmField) {\r
- super(msgVersion, MatchEntries.class);\r
- this.oxmClass = oxmClass;\r
- this.oxmField = oxmField;\r
- }\r
-\r
- /**\r
- * @param experimenterId experimenter / vendor ID\r
- */\r
- public void setExperimenterId(Long experimenterId) {\r
- this.experimenterId = experimenterId;\r
- }\r
-\r
- @Override\r
- public int hashCode() {\r
- final int prime = 31;\r
- int result = super.hashCode();\r
- result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());\r
- result = prime * result + ((oxmClass == null) ? 0 : oxmClass.hashCode());\r
- result = prime * result + ((oxmField == null) ? 0 : oxmField.hashCode());\r
- return result;\r
- }\r
-\r
- @Override\r
- public boolean equals(Object obj) {\r
- if (this == obj) {\r
- return true;\r
- }\r
- if (!super.equals(obj)) {\r
- return false;\r
- }\r
- if (getClass() != obj.getClass()) {\r
- return false;\r
- }\r
- MatchEntrySerializerKey<?, ?> other = (MatchEntrySerializerKey<?, ?>) obj;\r
- if (experimenterId == null) {\r
- if (other.experimenterId != null) {\r
- return false;\r
- }\r
- } else if (!experimenterId.equals(other.experimenterId)) {\r
- return false;\r
- }\r
- if (oxmClass == null) {\r
- if (other.oxmClass != null) {\r
- return false;\r
- }\r
- } else if (!oxmClass.equals(other.oxmClass)) {\r
- return false;\r
- }\r
- if (oxmField == null) {\r
- if (other.oxmField != null) {\r
- return false;\r
- }\r
- } else if (!oxmField.equals(other.oxmField)) {\r
- return false;\r
- }\r
- return true;\r
- }\r
-\r
- @Override\r
- public String toString() {\r
- return super.toString() + " oxm_class: " + oxmClass.getName() + " oxm_field: "\r
- + oxmField.getName() + " experimenterID: " + experimenterId;\r
- }\r
+/*
+ * Copyright (c) 2014 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.keys;
+
+import org.opendaylight.openflowjava.protocol.api.extensibility.MessageTypeKey;
+import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterSerializerKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.MatchField;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.OxmClassBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
+
+/**
+ * @author michal.polkorab
+ * @param <OXM_CLASS> oxm_class (see specification)
+ * @param <OXM_FIELD> oxm_field (see specification)
+ */
+public final class MatchEntrySerializerKey<OXM_CLASS extends OxmClassBase, OXM_FIELD extends MatchField>
+ extends MessageTypeKey<MatchEntries> implements ExperimenterSerializerKey {
+
+ private Class<OXM_CLASS> oxmClass;
+ private Class<OXM_FIELD> oxmField;
+ private Long experimenterId;
+
+ /**
+ * @param msgVersion protocol wire version
+ * @param objectType class of serialized object
+ * @param oxmClass oxm_class (see specification)
+ * @param oxmField oxm_field (see specification)
+ */
+ public MatchEntrySerializerKey(short msgVersion, Class<OXM_CLASS> oxmClass,
+ Class<OXM_FIELD> oxmField) {
+ super(msgVersion, MatchEntries.class);
+ this.oxmClass = oxmClass;
+ this.oxmField = oxmField;
+ }
+
+ /**
+ * @param experimenterId experimenter / vendor ID
+ */
+ public void setExperimenterId(Long experimenterId) {
+ this.experimenterId = experimenterId;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
+ result = prime * result + ((oxmClass == null) ? 0 : oxmClass.hashCode());
+ result = prime * result + ((oxmField == null) ? 0 : oxmField.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ MatchEntrySerializerKey<?, ?> other = (MatchEntrySerializerKey<?, ?>) obj;
+ if (experimenterId == null) {
+ if (other.experimenterId != null) {
+ return false;
+ }
+ } else if (!experimenterId.equals(other.experimenterId)) {
+ return false;
+ }
+ if (oxmClass == null) {
+ if (other.oxmClass != null) {
+ return false;
+ }
+ } else if (!oxmClass.equals(other.oxmClass)) {
+ return false;
+ }
+ if (oxmField == null) {
+ if (other.oxmField != null) {
+ return false;
+ }
+ } else if (!oxmField.equals(other.oxmField)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " oxm_class: " + oxmClass.getName() + " oxm_field: "
+ + oxmField.getName() + " experimenterID: " + experimenterId;
+ }
}
\ No newline at end of file