Method Element
Element()
Retrieves, but does not remove, the head of this queue. This method differs from Peek() only in that it throws an exception if this queue is empty.
This implementation returns the result of Peek() unless the queue is empty.
Declaration
public virtual T Element()
Returns
Type | Description |
---|---|
T | the head of this queue |