* Renamed method FlowEntry.getFlowId() to FlowEntry.flowId() for consistency
with the rest of the methods in that class.
* Added new method FlowEntry.isValidFlowEntryId(), and the corresponding
unit test.
* Minor fix inside FlowEntryTest.testToString(): add the optional string
identifying each assertEquals() check.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntry.java b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntry.java
index 762d272..9862040 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntry.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/FlowEntry.java
@@ -119,7 +119,7 @@
* @return the Flow ID.
*/
@JsonIgnore
- public FlowId getFlowId() { return flowId; }
+ public FlowId flowId() { return flowId; }
/**
* Set the Flow ID.
@@ -149,6 +149,17 @@
}
/**
+ * Test whether the Flow Entry ID is valid.
+ *
+ * @return true if the Flow Entry ID is valid, otherwise false.
+ */
+ public boolean isValidFlowEntryId() {
+ if (this.flowEntryId == null)
+ return false;
+ return (this.flowEntryId.value() != 0);
+ }
+
+ /**
* Get the Flow Entry Match.
*
* @return the Flow Entry Match.