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.instruction.rev130731.instructions.grouping.Instruction;
14 * @author michal.polkorab
17 public class InstructionDeserializerKey extends MessageCodeKey {
19 private Long experimenterId;
21 * @param version protocol wire version
22 * @param type instruction type
23 * @param experimenterId experimenter (vendor) identifier
25 public InstructionDeserializerKey(short version, int type,
26 Long experimenterId) {
27 super(version, type, Instruction.class);
28 this.experimenterId = experimenterId;
32 public int hashCode() {
34 int result = super.hashCode();
35 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
40 public boolean equals(Object obj) {
44 if (!super.equals(obj)) {
47 if (!(obj instanceof InstructionDeserializerKey)) {
50 InstructionDeserializerKey other = (InstructionDeserializerKey) obj;
51 if (experimenterId == null) {
52 if (other.experimenterId != null) {
55 } else if (!experimenterId.equals(other.experimenterId)) {
62 public String toString() {
63 return super.toString() + " experimenterID: " + experimenterId;