diff options
Diffstat (limited to 'models-pap/src/main/java')
-rw-r--r-- | models-pap/src/main/java/org/onap/policy/models/pap/concepts/PolicyNotification.java | 10 |
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()); + } } |