* 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 org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.action.container.action.choice.ExperimenterIdCase;
+import java.util.Objects;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.experimenter.id.action.ExperimenterIdCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.ExperimenterActionSubType;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
/**
* Key for an experimenter action serializer.
* @param experimenterId experimenter / vendor ID
* @param actionSubType vendor defined subtype
*/
- public ExperimenterActionSerializerKey(short msgVersion, Long experimenterId,
- Class<? extends ExperimenterActionSubType> actionSubType) {
+ public ExperimenterActionSerializerKey(final Uint8 msgVersion, final Uint32 experimenterId,
+ final Class<? extends ExperimenterActionSubType> actionSubType) {
super(msgVersion, ExperimenterIdCase.class, experimenterId);
this.actionSubType = actionSubType;
}
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
return false;
}
ExperimenterActionSerializerKey other = (ExperimenterActionSerializerKey) obj;
- if (actionSubType == null) {
- if (other.actionSubType != null) {
- return false;
- }
- } else if (!actionSubType.equals(other.actionSubType)) {
+ if (!Objects.equals(actionSubType, other.actionSubType)) {
return false;
}
return true;