queue class

Description

Represents a first-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
queue()

Get an instance with initial value.

queue(string)

Gets an instance initialized by the initialization string.

queue{bool}(string)

Gets an instance initialized by the initialization string.

queue{int}(string)

Gets an instance initialized by the initialization string.

queue{long}(string)

Gets an instance initialized by the initialization string.

queue{real}(string)

Gets an instance initialized by the initialization string.

queue{string}(string)

Gets an instance initialized by the initialization string.

getter

SignatureDescription
Count

Gets the number of elements that contained in the queue.

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 queue.

Copy()

Gets a copy of the caller queue.

Dequeue()

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

Enqueue(class)

Adds an instance to the end of the queue.

Peek()

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

Sort(bool)

Gets a new queue that sorted the caller queue.

ToList()

Copies the queue elements to a new list.

Copyright © Rice All rights reserved.