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;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
16 public class MatchInfo implements Serializable {
17 private static final long serialVersionUID = 1L;
19 private final MatchFieldType m_matchField;
20 private long[] m_alMatchValues;
21 private BigInteger[] m_aBigIntValues;
22 private String[] m_asMatchValues;
24 public MatchInfo(MatchFieldType matchField, long[] alMatchValues) {
25 m_matchField = matchField;
26 m_alMatchValues = alMatchValues;
29 public MatchInfo(MatchFieldType matchField, BigInteger[] alBigMatchValues) {
30 m_matchField = matchField;
31 m_aBigIntValues = alBigMatchValues;
34 public MatchInfo(MatchFieldType matchField, String[] alStringMatchValues) {
35 m_matchField = matchField;
36 m_asMatchValues = alStringMatchValues;
39 public void createInnerMatchBuilder(Map<Class<?>, Object> mapMatchBuilder) {
40 m_matchField.createInnerMatchBuilder(this, mapMatchBuilder);
43 public void setMatch(MatchBuilder matchBuilder, Map<Class<?>, Object> mapMatchBuilder) {
44 m_matchField.setMatch(matchBuilder, this, mapMatchBuilder);
47 public MatchFieldType getMatchField() {
51 public long[] getMatchValues() {
52 return m_alMatchValues;
55 public BigInteger[] getBigMatchValues() {
56 return m_aBigIntValues;
59 public String[] getStringMatchValues() {
60 return m_asMatchValues;