function DoubleEndedQueueInterface::addLast
Inserts the specified element at the end of this queue if it is possible to do so immediately without violating capacity restrictions.
When using a capacity-restricted double-ended queue, it is generally preferable to use the `offerLast()` method.
This method is equivalent to `add()`.
Parameters
T $element The element to add to the end of this queue.:
Return value
bool `true` if this queue changed as a result of the call.
Throws
RuntimeException if a queue refuses to add a particular element for any reason other than that it already contains the element. Implementations should use a more-specific exception that extends `\RuntimeException`.
1 method overrides DoubleEndedQueueInterface::addLast()
- DoubleEndedQueue::addLast in vendor/
ramsey/ collection/ src/ DoubleEndedQueue.php
File
-
vendor/
ramsey/ collection/ src/ DoubleEndedQueueInterface.php, line 204
Class
- DoubleEndedQueueInterface
- A linear collection that supports element insertion and removal at both ends.
Namespace
Ramsey\CollectionCode
public function addLast(mixed $element) : bool;