2 * Copyright (c) 2013 Cisco Systems, Inc. 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.openflowplugin.api.openflow.md.core;
10 public class TranslatorKey {
12 private final int version;
13 private final String messageClass;
17 * @param version version
18 * @param messageClass message class
20 public TranslatorKey(int version, String messageClass) {
21 this.version = version;
22 this.messageClass = messageClass;
26 public int hashCode() {
29 result = prime * result
30 + ((messageClass == null) ? 0 : messageClass.hashCode());
31 result = prime * result + version;
36 public boolean equals(Object obj) {
43 if (getClass() != obj.getClass()) {
46 TranslatorKey other = (TranslatorKey) obj;
47 if (messageClass == null) {
48 if (other.messageClass != null) {
51 } else if (!messageClass.equals(other.messageClass)) {
54 return version == other.version;