Removes the first instance of the specified value in the queue. @param identity If true, == comparison will be used. If false, .equals() comparison will be used. @return true if value was found and removed, false otherwise
(T value, boolean identity)
| 214 | * @param identity If true, == comparison will be used. If false, .equals() comparison will be used. |
| 215 | * @return true if value was found and removed, false otherwise */ |
| 216 | public boolean removeValue (T value, boolean identity) { |
| 217 | int index = indexOf(value, identity); |
| 218 | if (index == -1) return false; |
| 219 | removeIndex(index); |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | /** Removes and returns the item at the specified index. */ |
| 224 | public T removeIndex (int index) { |