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.openflowjava.protocol.api.extensibility.MessageCodeKey;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction.rev130731.instructions.grouping.Instruction;
15 * @author michal.polkorab
18 public class InstructionDeserializerKey extends MessageCodeKey {
20 private Long experimenterId;
22 * @param version protocol wire version
23 * @param type instruction type
24 * @param experimenterId
26 public InstructionDeserializerKey(short version, int type,
27 Long experimenterId) {
28 super(version, type, Instruction.class);
29 this.experimenterId = experimenterId;
33 public int hashCode() {
35 int result = super.hashCode();
36 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
41 public boolean equals(Object obj) {
45 if (!super.equals(obj)) {
48 if (!(obj instanceof InstructionDeserializerKey)) {
51 InstructionDeserializerKey other = (InstructionDeserializerKey) obj;
52 if (experimenterId == null) {
53 if (other.experimenterId != null) {
56 } else if (!experimenterId.equals(other.experimenterId)) {
63 public String toString() {
64 return super.toString() + " experimenterID: " + experimenterId;