X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fapi%2Fkeys%2Fexperimenter%2FExperimenterIdDeserializerKey.java;h=cafde3792d1f25b7296cf1c4baa7d3b6e8144695;hb=07de1ed897da9d7dc70c6d550f38c59339ed751e;hp=d4841f20521f0f91d0d09915316952594efb58dd;hpb=9e08a4f5084193144692b3dce28dc39983c48cd3;p=openflowjava.git diff --git a/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterIdDeserializerKey.java b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterIdDeserializerKey.java index d4841f20..cafde379 100644 --- a/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterIdDeserializerKey.java +++ b/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/experimenter/ExperimenterIdDeserializerKey.java @@ -1,65 +1,70 @@ -/* - * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.openflowjava.protocol.api.keys.experimenter; - -import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey; -import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; -import org.opendaylight.yangtools.yang.binding.DataObject; - -/** - * @author michal.polkorab - * - */ -public final class ExperimenterIdDeserializerKey extends MessageCodeKey - implements ExperimenterDeserializerKey { - - private Long experimenterId; - - /** - * @param version protocol wire version - * @param experimenterId experimenter / vendor ID - * @param objectClass class of created object - */ - public ExperimenterIdDeserializerKey(short version, - Long experimenterId, Class objectClass) { - super(version, EncodeConstants.EXPERIMENTER_VALUE, objectClass); - this.experimenterId = experimenterId; - } - - - @Override - public int hashCode() { - final int prime = 31; - int result = super.hashCode(); - result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (!(obj instanceof ExperimenterIdDeserializerKey)) - return false; - ExperimenterIdDeserializerKey other = (ExperimenterIdDeserializerKey) obj; - if (experimenterId == null) { - if (other.experimenterId != null) - return false; - } else if (!experimenterId.equals(other.experimenterId)) - return false; - return true; - } - - @Override - public String toString() { - return super.toString() + " experimenterID: " + experimenterId; - } +/* + * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.api.keys.experimenter; + +import org.opendaylight.openflowjava.protocol.api.extensibility.MessageCodeKey; +import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants; +import org.opendaylight.yangtools.yang.binding.DataObject; + +/** + * @author michal.polkorab + * + */ +public final class ExperimenterIdDeserializerKey extends MessageCodeKey + implements ExperimenterDeserializerKey { + + private Long experimenterId; + + /** + * @param version protocol wire version + * @param experimenterId experimenter / vendor ID + * @param objectClass class of created object + */ + public ExperimenterIdDeserializerKey(short version, + Long experimenterId, Class objectClass) { + super(version, EncodeConstants.EXPERIMENTER_VALUE, objectClass); + this.experimenterId = experimenterId; + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + ((experimenterId == null) ? 0 : experimenterId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!super.equals(obj)) { + return false; + } + if (!(obj instanceof ExperimenterIdDeserializerKey)) { + return false; + } + ExperimenterIdDeserializerKey other = (ExperimenterIdDeserializerKey) obj; + if (experimenterId == null) { + if (other.experimenterId != null) { + return false; + } + } else if (!experimenterId.equals(other.experimenterId)) { + return false; + } + return true; + } + + @Override + public String toString() { + return super.toString() + " experimenterID: " + experimenterId; + } } \ No newline at end of file