Modify pom file
[nemo.git] / nemo-tools / eclipse-plugin / nemo-rest / org.opendaylight.nemo.tool.eclipse.plugin.rest / src / org / opendaylight / nemo / tool / eclipse / plugin / rest / actions / model / Match.java
1 package org.opendaylight.nemo.tool.eclipse.plugin.rest.actions.model;
2
3 import org.json.JSONObject;
4
5 /**
6  * Created by hj on 10/29/15.
7  */
8 public class Match implements INemoItem{
9     private String matchName;
10     private MatchValue value;
11
12     public Match(String matchName, MatchValue value) {
13         this.matchName = matchName;
14         this.value = value;
15     }
16
17     @Override
18     public JSONObject toJSONObject() {
19         JSONObject matchJs = new JSONObject();
20         matchJs.put("match-item-name",matchName);
21         JSONObject js = new JSONObject();
22         js.put("string-value", value.getValue());
23         matchJs.put("match-item-value",js);
24         return matchJs;
25     }
26 }