![]() Precondition: the queue is not empty Postcondition: the head of the queue is removed and returned Returns: The value removed from the queue. dequeue() Remove a value from the head of the queue. See Also: dequeue() Precondition: the queue is not empty Postcondition: the head of the queue is removed and returned Specified by: remove in interface Linear Returns: The value actually removed. remove() Remove a value form the head of the queue. Postcondition: the value is added to the tail of the structure Parameters: value - The value to be added. Void enqueue( value) Add a value to the tail of the queue. See Also: enqueue() Postcondition: the value is added to the tail of the structure Specified by: add in interface Linear Specified by: add in interface Structure Parameters: value - The value added. Void add( value) Add a value to the tail of the queue. StructureĬlear, contains, elements, isEmpty, iterator, remove, values ![]() Methods inherited from interface structure. Returns the number of elements in the queue. Remove a value form the head of the queue. Remove a value from the head of the queue.įetch the value at the head of the queue. Used to process values in the order that they appear. Values are added at the tail, and removedįrom the head. Interface Queue All Superinterfaces: Linear, Structure All Known Implementing Classes: AbstractQueue, QueueArray, QueueList, QueueVectorĪ first-in, first-out structure. Should be used only to detect bugs.SUMMARY: NESTED | FIELD | CONSTR | METHOD Therefore, it would be wrong to write a program that depended on thisĮxception for its correctness: the fail-fast behavior of iterators Throw ConcurrentModificationException on a best-effort basis. Presence of unsynchronized concurrent modification. Note that the fail-fast behavior of an iterator cannot be guaranteedĪs it is, generally speaking, impossible to make any hard guarantees in the Modification, the iterator fails quickly and cleanly, rather than riskingĪrbitrary, non-deterministic behavior at an undetermined time in the Iterator's own remove method, the iterator will generally throw aĬoncurrentModificationException. The iterator is fail-fast: If the MinMaxPriorityQueue is modifiedĪt any time after the iterator is created, in any way except through the Returns an iterator over the elements contained in this collection, Since: 8.0 Author: Sverre Sundsdal, Torbjorn Gannholm This class is functionally equivalent to PriorityQueue, but
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |