Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Class

ArrayList<T>

class ArrayList<T>

Module: System.Collections
Assembly: System.Runtime.dll
Source file: ArrayList.rvn

Inheritance: Object → ArrayList<T>
Implements: List<T>

A growable array-backed list with indexed access, shallow copying and predicate searches.

Remarks

Count is the readable initialized prefix; Capacity may be larger. Negative capacity and indexes outside [0, Count) fault. Add grows storage as needed. Copy duplicates the sequence storage but does not deep-clone referenced elements.

Constructors

3 items
ArrayList() Creates an empty list with zero or the requested initial capacity; negative capacity faults.
ArrayList(capacity: int) Creates an empty list with zero or the requested initial capacity; negative capacity faults.
ArrayList(items: Iterable<T>) Copies elements in enumeration order.

Properties

2 items
Capacity: int Gets the allocated list capacity, which may exceed Count.
Count: int Gets the number of elements or entries. Implements Collection<T>.Count

Indexers

5 items
Extension member: Item[index: Index]: T Gets an element using a directional index. Invalid bounds fault. Extension from SequenceAccess.Item
Item[range: Range]: T[] Returns an independent shallow array copy; invalid bounds fault. Implements List<T>.Item
Extension member: Item[range: Range]: T[] Copies a range into independent storage. Invalid bounds fault. Extension from SequenceAccess.Item
Item[index: Index]: T Gets or replaces an element using a directional index. Invalid bounds fault. Implemented by ArrayList<T>.Item · Defined by List<T>.Item
Item[index: int]: T Gets or replaces the element at the zero-based index; an index outside the sequence bounds faults. Implements MutableSequence<T>.Item, Sequence<T>.Item

Methods

39 items
Add(value: T) -> () Appends an element to the end of the list. Implements List<T>.Add
Extension member: All(predicate: (T) -> bool) -> bool No summary available. Extension from Operators.All
Extension member: Any(predicate: (T) -> bool) -> bool No summary available. Extension from Operators.Any
Extension member: Any() -> bool Tests whether the source contains an element, or an element satisfying the supplied predicate. Extension from Operators.Any
Extension member: Concat(second: Iterable<T>) -> Iterable<T> Enumerates the first source followed by the second source. Extension from Operators.Concat
Copy() -> ArrayList<T> Creates a new list containing the current elements in order; reference-valued elements remain shared.
Extension member: Count(predicate: (T) -> bool) -> int No summary available. Extension from Operators.Count
Extension member: Count() -> int Counts source elements, optionally restricted by the supplied predicate. Extension from Operators.Count
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
Exists(match: (T) -> bool) -> bool No summary available.
Extension member: Filter(predicate: (T) -> bool) -> Iterable<T> No summary available. Extension from Operators.Filter
Find(match: (T) -> bool) -> Optional<T> No summary available.
Extension member: First(predicate: (T) -> bool) -> Optional<T> No summary available. Extension from Operators.First
Extension member: First() -> Optional<T> Returns the first source element matching the optional predicate, or None when none exists. Extension from Operators.First
Extension member: FlatMap<U>(selector: (T) -> Iterable<U>) -> Iterable<U> No summary available. Extension from Operators.FlatMap
Extension member: Fold<U>(seed: U, accumulator: (U, T) -> U) -> U No summary available. Extension from Operators.Fold
Extension member: Get(index: Index) -> Optional<T> Resolves a directional index against Count, returning None for invalid bounds. Extension from SequenceAccess.Get
Extension member: Get(index: int) -> Optional<T> Returns the indexed element, or None for invalid bounds. Does not provide a concurrent snapshot. Extension from SequenceAccess.Get
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetIterator() -> Iterator<T> Creates an iterator over the current sequence. Implements Iterable<T>.GetIterator
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
Extension member: Last(predicate: (T) -> bool) -> Optional<T> No summary available. Extension from Operators.Last
Extension member: Last() -> Optional<T> Returns the last source element matching the optional predicate, or None when none exists. Extension from Operators.Last
Extension member: Map<U>(selector: (T) -> U) -> Iterable<U> No summary available. Extension from Operators.Map
Extension member: OfType<U>() -> Iterable<U> Lazily retains non-null elements compatible with the requested result type, preserving order. Extension from Operators.OfType
Extension member: Single(predicate: (T) -> bool) -> Result<T, SingleError> No summary available. Extension from Operators.Single
Extension member: Single() -> Result<T, SingleError> Returns the sole matching element, or SingleError.Empty or SingleError.Multiple for a cardinality mismatch. Extension from Operators.Single
Extension member: Skip(count: int) -> Iterable<T> Returns an iterable that skips the requested number of leading elements. Extension from Operators.Skip
Slice(range: Range) -> Result<T[], InvalidRangeError> Returns an independent shallow array copy, resolving bounds against Count, not Capacity. Invalid bounds return InvalidRangeError before allocating the result.
Extension member: Slice(range: Range) -> Result<T[], InvalidRangeError> Copies a half-open range in enumeration order, or returns InvalidRangeError for invalid bounds. Uses one iterator and does not require constant-time indexed access. No concurrent s… Extension from SequenceAccess.Slice
Extension member: Take(count: int) -> Iterable<T> Returns an iterable containing at most the requested number of leading elements. Extension from Operators.Take
Extension member: ToList() -> ArrayList<T> Materializes the source into a new ArrayList in enumeration order. Extension from Operators.ToList
Extension member: ToMap<K, V>(keySelector: (T) -> K, valueSelector: (T) -> V, comparer: EqualityComparer<K>) -> HashMap<K, V> Materializes selected keys and values into a new map. Extension from Operators.ToMap
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString
TrueForAll(match: (T) -> bool) -> bool No summary available.