Java test specific property of an object using Collection.contains()
- by DrDro
In Java how to test if a Collection of objects contains an object depending on one of its properties.
For example I would like to test if Collection<myObjects> contains an instance of myObjects which has myObjects.name = "myName".