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
8 package org.opendaylight.openflowjava.protocol.api.keys;
10 import java.util.Objects;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
12 import org.opendaylight.yangtools.yang.common.Uint8;
15 * Key for an action deserializer.
17 * @author michal.polkorab
19 public class ActionDeserializerKey extends MessageCodeKey {
20 private final Long experimenterId;
25 * @param version protocol wire version
26 * @param type action type
27 * @param experimenterId experimenter / vendor ID
29 public ActionDeserializerKey(final Uint8 version, final int type, final Long experimenterId) {
30 super(version, type, Action.class);
31 this.experimenterId = experimenterId;
35 public int hashCode() {
37 int result = super.hashCode();
38 result = prime * result + (experimenterId == null ? 0 : experimenterId.hashCode());
43 public boolean equals(final Object obj) {
47 if (!super.equals(obj)) {
50 if (!(obj instanceof ActionDeserializerKey)) {
53 ActionDeserializerKey other = (ActionDeserializerKey) obj;
54 return Objects.equals(experimenterId, other.experimenterId);
58 public String toString() {
59 return super.toString() + " experimenterID: " + experimenterId;