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.openflow.md.core;
13 public class TranslatorKey {
16 private String messageClass;
22 public TranslatorKey(int version, String messageClass) {
23 this.version = version;
24 this.messageClass = messageClass;
28 public int hashCode() {
31 result = prime * result
32 + ((messageClass == null) ? 0 : messageClass.hashCode());
33 result = prime * result + version;
38 public boolean equals(Object obj) {
43 if (getClass() != obj.getClass())
45 TranslatorKey other = (TranslatorKey) obj;
46 if (messageClass == null) {
47 if (other.messageClass != null)
49 } else if (!messageClass.equals(other.messageClass))
51 if (version != other.version)