When a java.util.concurrent.BlockingQueue
According to the Java specification for the contains(Object o) method
If I previously inserted a new object, for example:
Task task = new Task("taskname", "somevalue"); queue.put(task);
On him. And later try to do this:
Task task = new Task("taskname", "somevalue"); queue.contains(task);
Since BlockingQueue is just an interface, according to the Java specification, should it return true or not?
The Task class is Serializable , so the comparison will be based on the field values ββon the right?
source share