2 * Copyright (c) 2013 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.impl.deserialization;
13 * Class used as a key in {@link DeserializerRegistryImpl}.
15 * @author michal.polkorab
16 * @author timotej.kubas
18 public class MessageTypeCodeKey {
20 private final short msgType;
21 private final short msgVersion;
26 * @param msgVersion protocol version
27 * @param msgType type code of message
29 public MessageTypeCodeKey(short msgVersion, short msgType) {
30 this.msgType = msgType;
31 this.msgVersion = msgVersion;
35 * Returns the msgType.
37 public short getMsgType() {
42 * Returns the msgVersion.
44 public short getMsgVersion() {
49 public int hashCode() {
52 result = prime * result + msgType;
53 result = prime * result + msgVersion;
58 public boolean equals(Object obj) {
65 if (getClass() != obj.getClass()) {
68 MessageTypeCodeKey other = (MessageTypeCodeKey) obj;
69 if (msgType != other.msgType) {
72 if (msgVersion != other.msgVersion) {