I have an ArrayList of objects in Java. The objects have four fields, two of which I\'d use to consider the object equal to another. I\'m looking for the most efficient wa
If you are a user of my ForEach DSL, it can be done with a Detect query.
Detect
Foo foo = ... Detect query = Detect.from(list); for (Detect each: query) each.yield = each.element.a == foo.a && each.element.b == foo.b; return query.result();