Index: trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 15831)
+++ trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 15832)
@@ -6,5 +6,4 @@
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -12,4 +11,5 @@
 import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.stream.Collectors;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -69,13 +69,9 @@
 
     protected void fireConflictAdded() {
-        for (IConflictListener listener : listeners) {
-            listener.onConflictsAdded(this);
-        }
+        listeners.forEach(listener -> listener.onConflictsAdded(this));
     }
 
     protected void fireConflictRemoved() {
-        for (IConflictListener listener : listeners) {
-            listener.onConflictsRemoved(this);
-        }
+        listeners.forEach(listener -> listener.onConflictsRemoved(this));
     }
 
@@ -114,7 +110,5 @@
     public void add(Collection<Conflict<?>> otherConflicts) {
         if (otherConflicts == null) return;
-        for (Conflict<?> c : otherConflicts) {
-            addConflict(c);
-        }
+        otherConflicts.forEach(this::addConflict);
         fireConflictAdded();
     }
@@ -146,13 +140,9 @@
      *
      * @param my  the primitive
-     */
+     * @deprecated use {@link #removeForMy(OsmPrimitive)}
+     */
+    @Deprecated
     public void remove(OsmPrimitive my) {
-        Iterator<Conflict<?>> it = iterator();
-        while (it.hasNext()) {
-            if (it.next().isMatchingMy(my)) {
-                it.remove();
-            }
-        }
-        fireConflictRemoved();
+        removeForMy(my);
     }
 
@@ -166,9 +156,8 @@
      */
     public Conflict<?> getConflictForMy(OsmPrimitive my) {
-        for (Conflict<?> c : conflicts) {
-            if (c.isMatchingMy(my))
-                return c;
-        }
-        return null;
+        return conflicts.stream()
+                .filter(c -> c.isMatchingMy(my))
+                .findFirst()
+                .orElse(null);
     }
 
@@ -182,9 +171,8 @@
      */
     public Conflict<?> getConflictForTheir(OsmPrimitive their) {
-        for (Conflict<?> c : conflicts) {
-            if (c.isMatchingTheir(their))
-                return c;
-        }
-        return null;
+        return conflicts.stream()
+                .filter(c -> c.isMatchingTheir(their))
+                .findFirst()
+                .orElse(null);
     }
 
@@ -225,9 +213,6 @@
      */
     public void removeForMy(OsmPrimitive my) {
-        Iterator<Conflict<?>> it = iterator();
-        while (it.hasNext()) {
-            if (it.next().isMatchingMy(my)) {
-                it.remove();
-            }
+        if (conflicts.removeIf(c -> c.isMatchingMy(my))) {
+            fireConflictRemoved();
         }
     }
@@ -239,9 +224,6 @@
      */
     public void removeForTheir(OsmPrimitive their) {
-        Iterator<Conflict<?>> it = iterator();
-        while (it.hasNext()) {
-            if (it.next().isMatchingTheir(their)) {
-                it.remove();
-            }
+        if (conflicts.removeIf(c -> c.isMatchingTheir(their))) {
+            fireConflictRemoved();
         }
     }
@@ -290,9 +272,7 @@
      */
     public void add(ConflictCollection other) {
-        for (Conflict<?> c : other) {
-            if (!hasConflict(c)) {
-                add(c);
-            }
-        }
+        other.conflicts.stream()
+                .filter(c -> !hasConflict(c))
+                .forEach(this::add);
     }
 
@@ -305,9 +285,7 @@
      */
     public Set<OsmPrimitive> getMyConflictParties() {
-        Set<OsmPrimitive> ret = new HashSet<>();
-        for (Conflict<?> c: conflicts) {
-            ret.add(c.getMy());
-        }
-        return ret;
+        return conflicts.stream()
+                .map(Conflict::getMy)
+                .collect(Collectors.toSet());
     }
 
@@ -320,9 +298,7 @@
      */
     public Set<OsmPrimitive> getTheirConflictParties() {
-        Set<OsmPrimitive> ret = new HashSet<>();
-        for (Conflict<?> c: conflicts) {
-            ret.add(c.getTheir());
-        }
-        return ret;
+        return conflicts.stream()
+                .map(Conflict::getTheir)
+                .collect(Collectors.toSet());
     }
 
