virtual class std::LinkedList

sys::Obj
  std::LinkedList

Doubly-linked list implementation

_size

protected Int _size := 0

add

Void add(LinkedElem e)

Add the specified item to the end of the list

clear

Void clear()

Remove all items from the list and set size to 0

first

LinkedElem? first()

Return the first item, or if empty return null.

protected LinkedElem? head

insertBefore

Void insertBefore(LinkedElem e, LinkedElem? other := null)

Insert the item before specified item

isEmpty

Bool isEmpty()

size is 0

last

LinkedElem? last()

Return the last item, or if empty return null.

make

new make()

poll

LinkedElem? poll()

Remove the first item

pop

LinkedElem? pop()

Remove the last item

remove

Void remove(LinkedElem? e)

Remove the item in list if item is null do nothing.

removeFirst

LinkedElem? removeFirst()

Remove the first item

size

Int size()

The number of items in the list.

tail

protected LinkedElem? tail

toStr

virtual override Str toStr()

Return a string representation the list.