Java test specific property of an object using Collection.contains()
Posted
by DrDro
on Stack Overflow
See other posts from Stack Overflow
or by DrDro
Published on 2010-04-23T09:55:58Z
Indexed on
2010/04/23
10:03 UTC
Read the original article
Hit count: 341
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".
© Stack Overflow or respective owner