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.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.oxm.fields.grouping.MatchEntries;
14 * @author michal.polkorab
17 public final class MatchEntryDeserializerKey extends MessageCodeKey
18 implements ExperimenterDeserializerKey {
21 private Long experimenterId;
24 * @param version protocol wire version
25 * @param oxmClass oxm_class (see specification)
26 * @param oxmField oxm_field (see specification)
28 public MatchEntryDeserializerKey(short version,
29 int oxmClass, int oxmField) {
30 super(version, oxmClass, MatchEntries.class);
31 this.oxmField = oxmField;
35 * @param experimenterId experimenter / vendor ID
37 public void setExperimenterId(Long experimenterId) {
38 this.experimenterId = experimenterId;
42 public int hashCode() {
44 int result = super.hashCode();
45 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
46 result = prime * result + oxmField;
51 public boolean equals(Object obj) {
55 if (!super.equals(obj)) {
58 if (getClass() != obj.getClass()) {
61 MatchEntryDeserializerKey other = (MatchEntryDeserializerKey) obj;
62 if (experimenterId == null) {
63 if (other.experimenterId != null) {
66 } else if (!experimenterId.equals(other.experimenterId)) {
69 if (oxmField != other.oxmField) {
76 public String toString() {
77 return super.toString() + " oxm_field: " + oxmField + " experimenterID: " + experimenterId;