+ //
+ // OBJECT METHODS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int hashCode() {
+ int hashCode = super.hashCode();
+ for (T element : elements) {
+ hashCode ^= element.hashCode();
+ }
+ return hashCode;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean equals(Object object) {
+ if (!(object instanceof ListNotification)) {
+ return false;
+ }
+ ListNotification<?> listNotification = (ListNotification<?>) object;
+ if (!super.equals(listNotification)) {
+ return false;
+ }
+ if (!key.equals(listNotification.key)) {
+ return false;
+ }
+ return elements.equals(listNotification.elements);
+ }
+