peekFirst


Description:

public T peekFirst ()

Returns the first element without removing it. Returns null if the list is empty.

Example:

    var list = new LinkedList<string> (GLib.str_equal);
list.addLast ("a");
assert (list.peekFirst () == "a");
assert (list.size () == 1);

Returns:

the first element, or null if empty.