Queue interface:
Inherited from collection Interface
FIFO
Common Methods:
Offer () inserts elements at the end of the Team for cross-border checks
Peek () obtains the element of the queue header. The check is not empty.
Poll () gets and deletes the Header element of the team, and checks for non-empty content.
Shortlist:
The inclulist implements the deque interface (double ended queue, dual-end Queue), while deque is a sub-interface of the queue.
Common Methods:
Addfirst () insert the queue Header
Addlast () insert to team end
Getfirst () gets the team Header
Getlast () to get the team end
Removefirst () deletes a queue Header
Removelast () deletes the team end
Peekfirst () obtains the queue header, which is not empty for checking.
Peeklast () is used to obtain the end of the team and check whether it is not empty.
Pollfirst () gets and deletes the team header, non-empty check
Polllast () gets and deletes the team end, non-empty check