2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. 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
8 package org.opendaylight.genius.mdsalutil;
10 import java.io.Serializable;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
13 public abstract class ActionInfo implements Serializable {
15 private static final long serialVersionUID = 1L;
17 private final int actionKey;
19 public ActionInfo(int actionKey) {
20 this.actionKey = actionKey;
23 public int getActionKey() {
27 public Action buildAction() {
28 return buildAction(getActionKey());
31 public abstract Action buildAction(int newActionKey);
34 public String toString() {
35 return "ActionInfo{actionKey = " + actionKey + "}";
39 public boolean equals(Object other) {
43 if (other == null || getClass() != other.getClass()) {
47 ActionInfo that = (ActionInfo) other;
49 return actionKey == that.actionKey;
53 public int hashCode() {