Merge "Fix status-and-diag after BP migration"
[genius.git] / mdsalutil / mdsalutil-api / src / main / java / org / opendaylight / genius / mdsalutil / instructions / InstructionClearActions.java
1 /*
2  * Copyright © 2017 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.genius.mdsalutil.instructions;
9
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ClearActionsCaseBuilder;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey;
14
15 /**
16  * Clear actions instruction.
17  */
18 public class InstructionClearActions extends AbstractInstructionInfoImpl {
19
20     @Override
21     public Instruction buildInstruction(int instructionKey) {
22         return new InstructionBuilder()
23                 .setInstruction(new ClearActionsCaseBuilder().build())
24                 .setKey(new InstructionKey(instructionKey))
25                 .build();
26     }
27
28     @Override
29     public boolean equals2(Object other) {
30         if (this == other) {
31             return true;
32         }
33         if (other == null || getClass() != other.getClass()) {
34             return false;
35         }
36         return true;
37     }
38
39     @Override
40     public int hashCode2() {
41         return 17;
42     }
43
44     @Override
45     protected String toString2() {
46         return "InstructionClearActions";
47     }
48 }