isEmpty

Summary

Checks if the queue is empty.

Usage

public bool isEmpty()

Returns

true if the queue does not contain any elements and false otherwise.

Description

Checks if the queue is empty and contains zero elements.

Examples

Basic Usage
1
2
3
4
5
6
7
import System;
 
auto queue1 = new Queue<int>();
auto queue2 = new Queue<int>([ 1, 2, 3 ]);
 
Console.log(queue1.isEmpty()); // true
Console.log(queue2.isEmpty()); // false

Share

HTML | BBCode | Direct Link