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.experimenter;
11 import org.opendaylight.openflowjava.protocol.api.keys.ActionSerializerKey;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Experimenter;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.ExperimenterActionSubType;
16 * @author michal.polkorab
18 public final class ExperimenterActionSerializerKey extends ActionSerializerKey<Experimenter>
19 implements ExperimenterSerializerKey {
21 private Class<? extends ExperimenterActionSubType> actionSubType;
24 * @param msgVersion protocol wire version
25 * @param experimenterId experimenter / vendor ID
26 * @param actionSubType vendor defined subtype
28 public ExperimenterActionSerializerKey(short msgVersion, Long experimenterId, Class<? extends ExperimenterActionSubType> actionSubType) {
29 super(msgVersion, Experimenter.class, experimenterId);
30 this.actionSubType = actionSubType;
34 public int hashCode() {
36 int result = super.hashCode();
37 result = prime * result + ((actionSubType == null) ? 0 : actionSubType.hashCode());
42 public boolean equals(Object obj) {
46 if (!super.equals(obj)) {
49 if (getClass() != obj.getClass()) {
52 ExperimenterActionSerializerKey other = (ExperimenterActionSerializerKey) obj;
53 if (actionSubType == null) {
54 if (other.actionSubType != null) {
57 } else if (!actionSubType.equals(other.actionSubType)) {