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

API Browser

Class

ArrayStack<T>

class ArrayStack<T>

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

Inheritance: Object → ArrayStack<T>
Implements: Stack<T>

Unsynchronized array-backed LIFO stack. Iteration captures a shallow snapshot.

Constructors

3 items
ArrayStack() Creates an empty collection.
ArrayStack(capacity: int) Creates an empty collection with initial capacity.
ArrayStack(items: Iterable<T>) Pushes elements in enumeration order; the last input is removed first.

Properties

2 items
Capacity: int Number of allocated element slots.
Count: int Gets the current element count. Implements Collection<T>.Count

Methods

30 items
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
Clear() -> () Removes all elements. Implements Stack<T>.Clear
Extension member: Concat(second: Iterable<T>) -> Iterable<T> Enumerates the first source followed by the second source. Extension from Operators.Concat
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
Extension member: Filter(predicate: (T) -> bool) -> Iterable<T> No summary available. Extension from Operators.Filter
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
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> Iterates a shallow snapshot in removal order. 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
Peek() -> Optional<T> Reads the next element without removal. Implements Stack<T>.Peek
Pop() -> Optional<T> Removes the next element. Implements Stack<T>.Pop
Push(value: T) -> () Adds an element. Implements Stack<T>.Push
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
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