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.experimenter;
11 import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey;
12 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
16 * @author michal.polkorab
19 public final class ExperimenterIdDeserializerKey extends MessageCodeKey
20 implements ExperimenterDeserializerKey {
22 private Long experimenterId;
25 * @param version protocol wire version
26 * @param experimenterId experimenter / vendor ID
27 * @param objectClass class of created object
29 public <E extends DataObject> ExperimenterIdDeserializerKey(short version,
30 Long experimenterId, Class<E> objectClass) {
31 super(version, EncodeConstants.EXPERIMENTER_VALUE, objectClass);
32 this.experimenterId = experimenterId;
37 public int hashCode() {
39 int result = super.hashCode();
40 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
45 public boolean equals(Object obj) {
49 if (!super.equals(obj)) {
52 if (!(obj instanceof ExperimenterIdDeserializerKey)) {
55 ExperimenterIdDeserializerKey other = (ExperimenterIdDeserializerKey) obj;
56 if (experimenterId == null) {
57 if (other.experimenterId != null) {
60 } else if (!experimenterId.equals(other.experimenterId)) {
67 public String toString() {
68 return super.toString() + " experimenterID: " + experimenterId;