Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractQueue.Element Method

Retrieves, but does not remove, the head of this queue.

[Visual Basic]
Public Overridable Sub Element() _
    Implements IQueue.Element
[C#]
public virtual object Element();

Return Value

The head of this queue.

Implements

IQueue.Element

Remarks

This method differs from Peek only in that it throws an exception if this queue is empty.

ALso note that this implementation returns the result of Peek unless the queue is empty.

Exceptions

Exception Type Condition
NoElementsException If this queue is empty.

See Also

AbstractQueue Class | Spring.Collections Namespace