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.common.action.rev130731.Experimenter;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType;
15 * @author michal.polkorab
17 public final class ExperimenterActionSerializerKey extends ActionSerializerKey<Experimenter>
18 implements ExperimenterSerializerKey {
20 private Class<? extends ExperimenterActionSubType> actionSubType;
23 * @param msgVersion protocol wire version
24 * @param experimenterId experimenter / vendor ID
25 * @param actionSubType vendor defined subtype
27 public ExperimenterActionSerializerKey(short msgVersion, Long experimenterId, Class<? extends ExperimenterActionSubType> actionSubType) {
28 super(msgVersion, Experimenter.class, experimenterId);
29 this.actionSubType = actionSubType;
33 public int hashCode() {
35 int result = super.hashCode();
36 result = prime * result + ((actionSubType == null) ? 0 : actionSubType.hashCode());
41 public boolean equals(Object obj) {
45 if (!super.equals(obj)) {
48 if (getClass() != obj.getClass()) {
51 ExperimenterActionSerializerKey other = (ExperimenterActionSerializerKey) obj;
52 if (actionSubType == null) {
53 if (other.actionSubType != null) {
56 } else if (!actionSubType.equals(other.actionSubType)) {