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.List;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
16 public class InstructionInfo implements Serializable {
17 private static final long serialVersionUID = 1L;
19 private final InstructionType m_instructionType;
20 private long[] m_alInstructionValues;
21 private BigInteger[] m_alBigInstructionValues;
22 private List<ActionInfo> m_actionInfos;
24 // This constructor should be used incase of clearAction
25 public InstructionInfo(InstructionType instructionType) {
26 m_instructionType = instructionType;
29 public InstructionInfo(InstructionType instructionType, long[] instructionValues) {
30 m_instructionType = instructionType;
31 m_alInstructionValues = instructionValues;
34 public InstructionInfo(InstructionType instructionType, BigInteger[] instructionValues) {
35 m_instructionType = instructionType;
36 m_alBigInstructionValues = instructionValues;
39 public InstructionInfo(InstructionType instructionType, List<ActionInfo> actionInfos) {
40 m_instructionType = instructionType;
41 m_actionInfos = actionInfos;
44 public Instruction buildInstruction(int instructionKey) {
45 return m_instructionType.buildInstruction(this, instructionKey);
48 public InstructionType getInstructionType() {
49 return m_instructionType;
52 public long[] getInstructionValues() {
53 return m_alInstructionValues;
56 public BigInteger[] getBigInstructionValues() {
57 return m_alBigInstructionValues;
60 public List<ActionInfo> getActionInfos() {
64 public void setInstructionValues(long[] m_alInstructionValues) {
65 this.m_alInstructionValues = m_alInstructionValues;