2 * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowjava.protocol.api.keys;
11 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey;
12 import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterDeserializerKey;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
16 * @author michal.polkorab
19 public final class MatchEntryDeserializerKey extends MessageCodeKey
20 implements ExperimenterDeserializerKey {
23 private Long experimenterId;
26 * @param version protocol wire version
27 * @param oxmClass oxm_class (see specification)
28 * @param oxmField oxm_field (see specification)
30 public MatchEntryDeserializerKey(short version,
31 int oxmClass, int oxmField) {
32 super(version, oxmClass, MatchEntries.class);
33 this.oxmField = oxmField;
37 * @param experimenterId experimenter / vendor ID
39 public void setExperimenterId(Long experimenterId) {
40 this.experimenterId = experimenterId;
44 public int hashCode() {
46 int result = super.hashCode();
47 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
48 result = prime * result + oxmField;
53 public boolean equals(Object obj) {
57 if (!super.equals(obj)) {
60 if (getClass() != obj.getClass()) {
63 MatchEntryDeserializerKey other = (MatchEntryDeserializerKey) obj;
64 if (experimenterId == null) {
65 if (other.experimenterId != null) {
68 } else if (!experimenterId.equals(other.experimenterId)) {
71 if (oxmField != other.oxmField) {
78 public String toString() {
79 return super.toString() + " oxm_field: " + oxmField + " experimenterID: " + experimenterId;