remove
Removes a single instance of the specified element from this queue, if it is present. More formally, removes an element e such that o.equals(e), if this queue contains one or more such elements. Returns true if this queue contained the specified element (or equivalently, if this queue changed as a result of the call).
Return
true if this queue changed as a result of the call
Parameters
o
element to be removed from this queue, if present
Throws
if the class of the specified element is incompatible with this queue ({@docRoot}/java.base/java/util/Collection.html#optional-restrictions)
if the specified element is null ({@docRoot}/java.base/java/util/Collection.html#optional-restrictions)