peek


Description:

public T peek ()

Returns the element at the front of the queue without removing it. Returns null if the queue is empty.

Example:

    var queue = new Queue<string> ();
queue.enqueue ("a");
assert (queue.peek () == "a");
assert (queue.size () == 1);

Returns:

the front element, or null if empty.