Finalize Match/Action Objects - ONOS-1728
* Added equals() and hashCode() methods to objects with IDs
* Added/Updates Javadocs
* Implemented rudimentary execute and query methods for
Operations in the MatchActionModule. Operations are preserved
but not actually executed currently.
* Implemented factories for MatchActionOperationsId and
MatchActionOperations
* Added unit tests to check creation and execution of MatchAction
* Added unit tests for new Immutable classes
Change-Id: Id865d04fd1048d00e533736c95c3052148041d95
diff --git a/src/main/java/net/onrc/onos/core/matchaction/MatchActionId.java b/src/main/java/net/onrc/onos/core/matchaction/MatchActionId.java
index 3e485af..b520439 100644
--- a/src/main/java/net/onrc/onos/core/matchaction/MatchActionId.java
+++ b/src/main/java/net/onrc/onos/core/matchaction/MatchActionId.java
@@ -2,9 +2,17 @@
import net.onrc.onos.api.batchoperation.BatchOperationTarget;
+/**
+ * A unique identifier for a MatchAction. Objects of this class are immutable.
+ */
public final class MatchActionId implements BatchOperationTarget {
private final String value;
+ /**
+ * Creates a new Match Action Identifier based on the given id string.
+ *
+ * @param id unique id string
+ */
public MatchActionId(String id) {
value = id;
}
@@ -23,7 +31,7 @@
public boolean equals(Object obj) {
if (obj instanceof MatchActionId) {
MatchActionId other = (MatchActionId) obj;
- return (this.value.equals(other.value));
+ return (value.equals(other.value));
}
return false;
}