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