aboutsummaryrefslogtreecommitdiffstats
path: root/models-pap/src/main/java/org
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-10-17 14:58:59 -0400
committerJim Hahn <jrh3@att.com>2019-10-17 14:58:59 -0400
commitdc182bf477bc1d749abd5102f90f666bca45e37e (patch)
tree4823bcc0a4abb6c4a38aa291219b3d9c0396417a /models-pap/src/main/java/org
parent9c2c12756735b0354de68903bbba7bfb55d56863 (diff)
Add PolicyNotification.isEmpty() method
Change-Id: I5cf5f21b968975018bd1f18daa1653289b837d2e Issue-ID: POLICY-1841 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pap/src/main/java/org')
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java
index a9c22c463..1cdf254c4 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java
@@ -45,4 +45,14 @@ public class PolicyNotification {
this.added = added;
this.deleted = deleted;
}
+
+ /**
+ * Determines if the notification is empty (i.e., has no added or delete policy
+ * notifications).
+ *
+ * @return {@code true} if the notification is empty, {@code false} otherwise
+ */
+ public boolean isEmpty() {
+ return (added.isEmpty() && deleted.isEmpty());
+ }
}