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}
14 * @author michal.polkorab
15 * @author timotej.kubas
17 public class MessageTypeCodeKey {
19 private final short msgType;
20 private final short msgVersion;
23 * @param msgVersion protocol version
24 * @param msgType type code of message
26 public MessageTypeCodeKey(short msgVersion, short msgType) {
27 this.msgType = msgType;
28 this.msgVersion = msgVersion;
34 public short getMsgType() {
39 * @return the msgVersion
41 public short getMsgVersion() {
46 public int hashCode() {
49 result = prime * result + msgType;
50 result = prime * result + msgVersion;
55 public boolean equals(Object obj) {
62 if (getClass() != obj.getClass()) {
65 MessageTypeCodeKey other = (MessageTypeCodeKey) obj;
66 if (msgType != other.msgType) {
69 if (msgVersion != other.msgVersion) {