Refactor NoAction class

- Move from inner class to core.matchaction.action package
- Rename from NoAction to NullAction
- Make NullAction singleton

Change-Id: I0a41c7ef984492f2b293a6df27479a4cca68a5f9
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/Actions.java b/src/main/java/net/onrc/onos/core/matchaction/action/Actions.java
new file mode 100644
index 0000000..c69f871
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/Actions.java
@@ -0,0 +1,19 @@
+package net.onrc.onos.core.matchaction.action;
+
+/**
+ * Utility for creating an instance of action.
+ */
+public final class Actions {
+    private Actions() {}
+
+    // TODO: consider if it is meaningful to return NullAction
+    // instead of just Action
+    /**
+     * Returns an action representing null action.
+     *
+     * @return action representing null action
+     */
+    public static NullAction nullAction() {
+        return NullAction.getInstance();
+    }
+}
diff --git a/src/main/java/net/onrc/onos/core/matchaction/action/NullAction.java b/src/main/java/net/onrc/onos/core/matchaction/action/NullAction.java
new file mode 100644
index 0000000..3613ada
--- /dev/null
+++ b/src/main/java/net/onrc/onos/core/matchaction/action/NullAction.java
@@ -0,0 +1,23 @@
+package net.onrc.onos.core.matchaction.action;
+
+/**
+ * An action which does not affect anything at all.
+ * In other words, NOP.
+ *
+ * This action can be used for intent only. Flow Manager and Match Action Manager
+ * may not handle correctly.
+ */
+public final class NullAction implements Action {
+    private static final NullAction INSTANCE = new NullAction();
+
+    private NullAction() {}
+
+    /**
+     * Returns singleton of this class.
+     *
+     * @return singleton of this class
+     */
+    static NullAction getInstance() {
+        return INSTANCE;
+    }
+}