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.api.extensibility;
\r
11 * @author michal.polkorab
\r
14 public class EnhancedMessageCodeKey extends MessageCodeKey {
\r
16 private int msgType2;
\r
20 * @param version wire protocol version
\r
21 * @param value used as distinguisher
\r
22 * @param value2 used as detailed distinguisher
\r
23 * @param clazz class of object that is going to be deserialized
\r
25 public EnhancedMessageCodeKey(short version, int value, int value2, Class<?> clazz) {
\r
26 super(version, value, clazz);
\r
27 this.msgType2 = value2;
\r
31 public int hashCode() {
\r
32 final int prime = 31;
\r
33 int result = super.hashCode();
\r
34 result = prime * result + msgType2;
\r
39 public boolean equals(Object obj) {
\r
43 if (!super.equals(obj)) {
\r
46 if (getClass() != obj.getClass()) {
\r
49 EnhancedMessageCodeKey other = (EnhancedMessageCodeKey) obj;
\r
50 if (msgType2 != other.msgType2) {
\r
57 public String toString() {
\r
58 return super.toString() + " msgType2: " + msgType2;
\r