2 * Copyright (c) 2015 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.vpnservice.mdsalutil;
10 import java.io.Serializable;
11 import java.math.BigInteger;
12 import java.util.Arrays;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
16 public class ActionInfo implements Serializable{
18 private static final long serialVersionUID = 1L;
19 private final ActionType m_actionType;
20 private String[] m_asActionValues = null;
21 private BigInteger [] m_aBigIntValues;
22 private int m_actionKey = 0;
24 public ActionInfo(ActionInfo action) {
26 m_actionType = action.m_actionType;
27 m_actionKey = action.m_actionKey;
28 m_asActionValues = Arrays.copyOf(action.m_asActionValues, action.m_asActionValues.length);
31 public ActionInfo(ActionType actionType, String[] asActionValues) {
32 m_actionType = actionType;
34 m_asActionValues = asActionValues;
37 public ActionInfo(ActionType actionType, BigInteger[] aBigIntValues) {
38 m_actionType = actionType;
40 m_aBigIntValues = aBigIntValues;
43 public void setActionKey(int key) {
47 public int getActionKey() {
51 public Action buildAction() {
52 return m_actionType.buildAction(this);
55 public ActionType getActionType() {
59 public String[] getActionValues() {
60 return m_asActionValues;
63 public BigInteger[] getBigActionValues() {
64 return m_aBigIntValues;