Stack<T>

Overview

Stack implementation, where items first added, are popped last.

Location

  • Reference:
    • Elements.dll  .NET, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Mapped to:
    • System.Collections.Generic.Stack  .NET, .NET Standard 2.0
    • java.util.Stack  Cooper
    • RemObjects.Elements.System.Stack  Island
    • Foundation.NSMutableArray  Toffee, ToffeeV2
  • Ancestry: ImmutableStack<T> | Stack<T>

 

constructor

 

constructor

 

Stack<T>()

 

init()

 

Stack<T>()

Clear

Clears this stack.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

Contains    (declared in ImmutableStack<T>)

Returns true if this list contains aItem.

 

method Contains(Item: T): Boolean

 

Boolean Contains(T Item)

 

func Contains(_ Item: T) -> Boolean

 

Boolean Contains(T Item)

Parameters:

  • Item:

Count    (declared in ImmutableStack<T>)

Returns the nr of items in this stack.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

MutableVersion    (declared in ImmutableStack<T>)

Creates a copy and returns it as mutable.

 

method MutableVersion: Stack<T>

 

Stack<T> MutableVersion()

 

func MutableVersion() -> Stack<T>

 

Stack<T> MutableVersion()

Peek    (declared in ImmutableStack<T>)

Gets the next item.

 

method Peek: T

 

T Peek()

 

func Peek() -> T

 

T Peek()

Pop

Removes the next item from the stack, or fails if none is available.

 

method Pop: T

 

T Pop()

 

func Pop() -> T

 

T Pop()

Push

Push a new value on this stack.

 

method Push(Item: T)

 

void Push(T Item)

 

func Push(_ Item: T)

 

void Push(T Item)

Parameters:

  • Item:

ToArray    (declared in ImmutableStack<T>)

Saves this stack as array.

 

method ToArray: array of T

 

T[] ToArray()

 

func ToArray() -> T...

 

T[] ToArray()

 

Count    (declared in ImmutableStack<T>)

Returns the nr of items in this stack.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

var Count: Int32 { get{} }

 

Integer Count { __get; }

 

constructor

 

constructor

 

Stack<T>()

 

init()

 

Stack<T>()

Clear

Clears this stack.

 

method Clear

 

void Clear()

 

func Clear()

 

void Clear()

Contains    (declared in ImmutableStack<T>)

Returns true if this list contains aItem.

 

method Contains(Item: T): Boolean

 

Boolean Contains(T Item)

 

func Contains(_ Item: T) -> Boolean

 

Boolean Contains(T Item)

Parameters:

  • Item:

MutableVersion    (declared in ImmutableStack<T>)

Creates a copy and returns it as mutable.

 

method MutableVersion: Stack<T>

 

Stack<T> MutableVersion()

 

func MutableVersion() -> Stack<T>

 

Stack<T> MutableVersion()

Peek    (declared in ImmutableStack<T>)

Gets the next item.

 

method Peek: T

 

T Peek()

 

func Peek() -> T

 

T Peek()

Pop

Removes the next item from the stack, or fails if none is available.

 

method Pop: T

 

T Pop()

 

func Pop() -> T

 

T Pop()

Push

Push a new value on this stack.

 

method Push(Item: T)

 

void Push(T Item)

 

func Push(_ Item: T)

 

void Push(T Item)

Parameters:

  • Item:

ToArray    (declared in ImmutableStack<T>)

Saves this stack as array.

 

method ToArray: array of T

 

T[] ToArray()

 

func ToArray() -> T...

 

T[] ToArray()