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.rev150225.match.entries.grouping.MatchEntry;
14 * Key for a match entry deserializer.
16 * @author michal.polkorab
18 public final class MatchEntryDeserializerKey extends MessageCodeKey
19 implements ExperimenterDeserializerKey {
21 private final int oxmField;
22 private Long experimenterId;
27 * @param version protocol wire version
28 * @param oxmClass oxm_class (see specification)
29 * @param oxmField oxm_field (see specification)
31 public MatchEntryDeserializerKey(short version,
32 int oxmClass, int oxmField) {
33 super(version, oxmClass, MatchEntry.class);
34 this.oxmField = oxmField;
38 * Sets the experimenter id.
40 * @param experimenterId experimenter / vendor ID
42 public void setExperimenterId(Long experimenterId) {
43 this.experimenterId = experimenterId;
47 public int hashCode() {
49 int result = super.hashCode();
50 result = prime * result + (experimenterId == null ? 0 : experimenterId.hashCode());
51 result = prime * result + oxmField;
56 public boolean equals(Object obj) {
60 if (!super.equals(obj)) {
63 if (getClass() != obj.getClass()) {
66 MatchEntryDeserializerKey other = (MatchEntryDeserializerKey) obj;
67 if (experimenterId == null) {
68 if (other.experimenterId != null) {
71 } else if (!experimenterId.equals(other.experimenterId)) {
74 if (oxmField != other.oxmField) {
81 public String toString() {
82 return super.toString() + " oxm_field: " + oxmField + " experimenterID: " + experimenterId;