* 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;
+import java.util.Objects;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
+import org.opendaylight.yangtools.yang.common.Uint8;
/**
* Key for an action deserializer.
* @author michal.polkorab
*/
public class ActionDeserializerKey extends MessageCodeKey {
-
private final Long experimenterId;
/**
* @param type action type
* @param experimenterId experimenter / vendor ID
*/
- public ActionDeserializerKey(short version,
- int type, Long experimenterId) {
+ public ActionDeserializerKey(final Uint8 version, final int type, final Long experimenterId) {
super(version, type, Action.class);
this.experimenterId = experimenterId;
}
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
return false;
}
ActionDeserializerKey other = (ActionDeserializerKey) obj;
- if (experimenterId == null) {
- if (other.experimenterId != null) {
- return false;
- }
- } else if (!experimenterId.equals(other.experimenterId)) {
- return false;
- }
- return true;
+ return Objects.equals(experimenterId, other.experimenterId);
}
@Override