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.openflowjava.protocol.api.util.EncodeConstants;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
15 * @author michal.polkorab
18 public final class ExperimenterIdDeserializerKey extends MessageCodeKey
19 implements ExperimenterDeserializerKey {
21 private Long experimenterId;
24 * @param version protocol wire version
25 * @param experimenterId experimenter / vendor ID
26 * @param objectClass class of created object
28 public <E extends DataObject> ExperimenterIdDeserializerKey(short version,
29 Long experimenterId, Class<E> objectClass) {
30 super(version, EncodeConstants.EXPERIMENTER_VALUE, objectClass);
31 this.experimenterId = experimenterId;
36 public int hashCode() {
38 int result = super.hashCode();
39 result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode());
44 public boolean equals(Object obj) {
48 if (!super.equals(obj)) {
51 if (!(obj instanceof ExperimenterIdDeserializerKey)) {
54 ExperimenterIdDeserializerKey other = (ExperimenterIdDeserializerKey) obj;
55 if (experimenterId == null) {
56 if (other.experimenterId != null) {
59 } else if (!experimenterId.equals(other.experimenterId)) {
66 public String toString() {
67 return super.toString() + " experimenterID: " + experimenterId;