Simplify list notification
[Sone.git] / src / main / java / net / pterodactylus / sone / notify / ListNotification.java
index 101b1fb..6911371 100644 (file)
@@ -194,15 +194,7 @@ public class ListNotification<T> extends TemplateNotification {
                if (!key.equals(listNotification.key)) {
                        return false;
                }
-               if (elements.size() != listNotification.elements.size()) {
-                       return false;
-               }
-               for (int index = 0; index < elements.size(); ++index) {
-                       if (!elements.get(index).equals(listNotification.elements.get(index))) {
-                               return false;
-                       }
-               }
-               return true;
+               return elements.equals(listNotification.elements);
        }
 
 }