Home About Rice Downloads Documents Others Cooker CookerGX
Documents  >  Class  >  stack
stack class

Description

Represents a last-in-first-out collection.

Notes

This class is a standard built-in class in the Rice language.

Instance that is created by declaration have been already initialized.

You can limit the type of the element by using the "{}" in the declaration.

If do not use the "{}" in the declaration, will be able to have an instance of any type as a element.

fitter

SignatureDescription
stack()

Get a new instance of stack class with initial value.

getter

SignatureDescription
Count

Gets the number of elements that contained in the stack.

Fitted

Gets the value that indicates whether this instance was already initialized.

TypeName

Gets the type name.

setter

This class does not have a setter.

method

SignatureDescription
Clear()

Removes all elements from the stack.

Peek()

Returns the instance at the top of the stack without removing.

Pop()

Removes and returns the instance at the top of the stack.

Push(class)

Adds an instance to the top of the stack.

ToList()

Copies the stack elements to a new list.

Copyright © Rice All rights reserved.