class · System

LinkedList<T>

public class System.LinkedList<T> : System.Any

A doubly linked list: adding and removing at either end, or next to a node, costs the same at any size. loop (T x in list) walks it from the first node.

Kind
class
Namespace
System
Assembly
System.Core
Access
public
Source file
LinkedList.ant

Type parameters

NameConstraints
Tany type

Inheritance

Base classes
Any LinkedList<T>

Properties

property Count: i32
#

read-only

property First: System.LinkedListNode<T>?
#

read-only

property Last: System.LinkedListNode<T>?
#

read-only

Methods

method AddFirst(value: T) -> System.LinkedListNode<T>
#
method AddLast(value: T) -> System.LinkedListNode<T>
#
method AddBefore(node: System.LinkedListNode<T>, value: T) -> System.LinkedListNode<T>
#

A new node with value just before node.

method AddAfter(node: System.LinkedListNode<T>, value: T) -> System.LinkedListNode<T>
#

A new node with value just after node.

method Remove(node: System.LinkedListNode<T>) -> void
#

Takes node out of the list.

method RemoveFirst() -> T
#

Takes the first node out; its value.

method RemoveLast() -> T
#

Takes the last node out; its value.

method Find(match: func<T> : bool) -> System.LinkedListNode<T>?
#

The first node whose value match accepts (null when none does).

method Clear() -> void
#
method ToArray() -> T[]
#

The values in order, as an array.

method Iterator() -> System.LinkedListIterator<T>
#

Private and internal members (5)

field first: System.LinkedListNode<T>?
#

private

field last: System.LinkedListNode<T>?
#

private

field count: i32
#

private

static method NotHere() -> void
#

private static

method Owns(node: System.LinkedListNode<T>) -> void
#

private

Inherited members (5)

Source

LinkedList<T> as Larva HIR, decompiled from its Larva HIR.

System.LinkedList.hir
// A doubly linked list: adding and removing at either end, or next to a node, costs the same at any size.
// `loop (T x in list)` walks it from the first node.
public class System.LinkedList<T> : System.Any
{
    field first: System.LinkedListNode<T>?
    field last: System.LinkedListNode<T>?
    field count: i32
    static method NotHere() -> void
    method Owns(node: System.LinkedListNode<T>) -> void
    method AddFirst(value: T) -> System.LinkedListNode<T>
    method AddLast(value: T) -> System.LinkedListNode<T>
    // A new node with `value` just before `node`.
    method AddBefore(node: System.LinkedListNode<T>, value: T) -> System.LinkedListNode<T>
    // A new node with `value` just after `node`.
    method AddAfter(node: System.LinkedListNode<T>, value: T) -> System.LinkedListNode<T>
    // Takes `node` out of the list.
    method Remove(node: System.LinkedListNode<T>) -> void
    // Takes the first node out; its value.
    method RemoveFirst() -> T
    // Takes the last node out; its value.
    method RemoveLast() -> T
    // The first node whose value `match` accepts (null when none does).
    method Find(match: func<T> : bool) -> System.LinkedListNode<T>?
    method Clear() -> void
    // The values in order, as an array.
    method ToArray() -> T[]
    method Iterator() -> System.LinkedListIterator<T>
    property Count: i32
    property First: System.LinkedListNode<T>?
    property Last: System.LinkedListNode<T>?
}
Esc