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
8 package org.opendaylight.openflowjava.protocol.api.extensibility;
10 import org.opendaylight.openflowjava.protocol.api.keys.MessageCodeKey;
13 * @author michal.polkorab
16 public class EnhancedMessageCodeKey extends MessageCodeKey {
22 * @param version wire protocol version
23 * @param value used as distinguisher
24 * @param value2 used as detailed distinguisher
25 * @param clazz class of object that is going to be deserialized
27 public EnhancedMessageCodeKey(short version, int value, int value2, Class<?> clazz) {
28 super(version, value, clazz);
29 this.msgType2 = value2;
33 public int hashCode() {
35 int result = super.hashCode();
36 result = prime * result + msgType2;
41 public boolean equals(Object obj) {
45 if (!super.equals(obj)) {
48 if (getClass() != obj.getClass()) {
51 EnhancedMessageCodeKey other = (EnhancedMessageCodeKey) obj;
52 if (msgType2 != other.msgType2) {
59 public String toString() {
60 return super.toString() + " msgType2: " + msgType2;