2 * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
8 package org.opendaylight.openflowjava.protocol.impl.util;
\r
11 * @author michal.polkorab
\r
14 public class TypeToClassKey {
\r
16 private short version;
\r
21 * @param version wire protocol version
\r
22 * @param type message type / code
\r
24 public TypeToClassKey(short version, int type) {
\r
25 this.version = version;
\r
30 public int hashCode() {
\r
31 final int prime = 31;
\r
33 result = prime * result + type;
\r
38 public boolean equals(Object obj) {
\r
45 if (getClass() != obj.getClass()) {
\r
48 TypeToClassKey other = (TypeToClassKey) obj;
\r
49 if (type != other.type) {
\r
52 if (version != other.version) {
\r