Appearance
KBE3D / KBCore / Cesium / Queue
类: Queue
A queue that can enqueue items at the end, and dequeue items from the front.
属性
length
readonlylength:number
The length of the queue.
方法
enqueue()
enqueue(
item:any):void
Enqueues the specified item.
参数
item
any
The item to enqueue.
返回
void
dequeue()
dequeue():
any
Dequeues an item. Returns undefined if the queue is empty.
返回
any
The the dequeued item.
peek()
peek():
any
Returns the item at the front of the queue. Returns undefined if the queue is empty.
返回
any
The item at the front of the queue.
contains()
contains(
item:any):void
Check whether this queue contains the specified item.
参数
item
any
The item to search for.
返回
void
clear()
clear():
void
Remove all items from the queue.
返回
void
sort()
sort(
compareFunction:Comparator):void
Sort the items in the queue in-place.
参数
compareFunction
A function that defines the sort order.
返回
void
构造函数
构造函数
new Queue():
Queue
返回
Queue
