2 * Copyright (c) 2014 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
9 package org.opendaylight.openflowjava.protocol.api.keys;
11 import org.opendaylight.yangtools.yang.binding.DataContainer;
14 * @param <T> class of object to be serialized
15 * @author michal.polkorab
17 public class ExperimenterIdTypeSerializerKey<T extends DataContainer> extends ExperimenterIdSerializerKey<T> {
22 * @param msgVersion protocol wire version
23 * @param experimenterId experimenter / vendor ID
24 * @param type data type according to vendor implementation
25 * @param objectClass class of object to be serialized
27 public ExperimenterIdTypeSerializerKey(short msgVersion,
28 long experimenterId, long type, Class<T> objectClass) {
29 super(msgVersion, experimenterId, objectClass);
34 public int hashCode() {
36 int result = super.hashCode();
37 result = prime * result + hashCodeOfLong(type);
42 public boolean equals(Object obj) {
43 if (!super.equals(obj)) {
46 if (!(obj instanceof ExperimenterIdTypeSerializerKey)) {
49 ExperimenterIdTypeSerializerKey<?> other = (ExperimenterIdTypeSerializerKey<?>) obj;
50 if (type != other.type) {
57 public String toString() {
58 return super.toString() + "; type: " + type;