Specified by: containsAll in interface Parameters: c - the collection of objects to be found in the queue. Public boolean containsAll( c) Determines if the specified collection is contained in the queue. Returns: true - if the specified object is in the queue. Specified by: contains in interface Parameters: obj - the object to be found in the queue. Public boolean contains( obj) Determines if the specified object is in the queue. Returns: true if the collection has any elements, because the Specified by: addAll in interface Parameters: c - the collection of objects to be added to the queue. Public boolean addAll( c) Enqueues each object of the specified collection onto the queue. Returns: true if the object is not null, because the queue has been changed. Specified by: add in interface Parameters: x - the type T object to be placed at the end of the queue. This collection contains the specified object. Consistent with theĬollection interface requirement that this method should ensure that Public boolean add( T x) Enqueues an object onto the end of the queue. Public abstract T peek() Returns the type T object on the beginning of the queue. Returns: the object at the beginning of the queue or null if the queue is empty. Public abstract T dequeue() Removes and returns the type T object at the beginning of the queue. Parameters: x - the type T object to be appended to the end of the queue. Public abstract void enqueue( T x) Appends a T object onto the end of the queue. ![]() In the queue while the iterator is being used. The cached value of theĬode should be used by iterators to check for any changes It isĪssumed that push, pop, clear, and clone methods will Protected int hash The cached value of the hash code for the queue. Methods inherited from class Ĭlone, finalize, getClass, notify, notifyAll, wait, wait, wait ![]() ![]() This is an optional method of the Collection Interface.Ĭreates an array containing the objects in this queue. Returns the type T object on the beginning of the queue. Returns the value of the hash code for this queue. Removes and returns the type T object at the beginning of the queue.Īppends a T object onto the end of the queue. The cached value of the hash code for the queue.Įnqueues an object onto the end of the queue.Įnqueues each object of the specified collection onto the queue.ĭetermines if the specified object is in the queue.ĭetermines if the specified collection is contained in the queue. The optional methods of the Collections interface, which wouldĪllow the queue integrity to be violated are not implementedĪnd throw an UnsupportedOperation exception. It implements the enqueue, dequeue and convenience methods. Public abstract class AbstractQueue extends implements, Ībstract class for the queue data structure. All Implemented Interfaces:, , Direct Known Subclasses: QueueCL, QueueLL SUMMARY: NESTED | FIELD | CONSTR | METHOD
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |