Apply the naming convention to BatchOperationEntry
Resolve ONOS-889
Change-Id: I2001fabba138b9ff5be9a5943d3f020b4c38d195
diff --git a/core/api/src/main/java/org/onosproject/net/flow/BatchOperationEntry.java b/core/api/src/main/java/org/onosproject/net/flow/BatchOperationEntry.java
index fc24775..7e0d5b5 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/BatchOperationEntry.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/BatchOperationEntry.java
@@ -48,7 +48,17 @@
*
* @return the target object of this operation
*/
+ @Deprecated
public U getTarget() {
+ return target();
+ }
+
+ /**
+ * Gets the target object of this operation.
+ *
+ * @return the target object of this operation
+ */
+ public U target() {
return target;
}
@@ -57,7 +67,17 @@
*
* @return the operator of this operation
*/
+ @Deprecated
public T getOperator() {
+ return operator();
+ }
+
+ /**
+ * Gets the operator of this operation.
+ *
+ * @return the operator of this operation
+ */
+ public T operator() {
return operator;
}
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchRequest.java b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchRequest.java
index a0be81c..35db171 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowRuleBatchRequest.java
@@ -44,7 +44,7 @@
@Override
public FlowRule apply(FlowRuleBatchEntry input) {
- return input.getTarget();
+ return input.target();
}
}).toList();
}
@@ -55,7 +55,7 @@
@Override
public FlowRule apply(FlowRuleBatchEntry input) {
- return input.getTarget();
+ return input.target();
}
}).toList();
}
diff --git a/core/api/src/test/java/org/onosproject/net/flow/BatchOperationTest.java b/core/api/src/test/java/org/onosproject/net/flow/BatchOperationTest.java
index 1395b8c..b4ca8fe 100644
--- a/core/api/src/test/java/org/onosproject/net/flow/BatchOperationTest.java
+++ b/core/api/src/test/java/org/onosproject/net/flow/BatchOperationTest.java
@@ -147,7 +147,7 @@
public void testEntryConstruction() {
final TestEntry entry = new TestEntry(TestType.OP3, new TestTarget(3));
- assertThat(entry.getOperator(), is(TestType.OP3));
- assertThat(entry.getTarget().id, is(3));
+ assertThat(entry.operator(), is(TestType.OP3));
+ assertThat(entry.target().id, is(3));
}
}